Hi, John,
Our circumstances are different yet I too had trouble with Epic's split command. As a result, I implemented my own. Please pardon the elevated-at-times tone of the comments. Also, this goes back to 4.4K. I'm not up to par on any split command changes since that version. Hopefully this will help if a reason cannot be determined for your case.
-Brent
package uOid;
...
# Boolean to workaround Epic split command bug -- hangs during post import hook.
# ATI30960. As of 20041213, Arbortext suggested using " vs.
# " within XML import templates. This worked for 1 file but not
# another. Leaving " in templates but turning workaround on.
global WORKAROUND_ATI30960 = 1;
...
#
# This function's only reason for existence is to provide an alternative to
# Epic's split command -- WHICH HANGS EPIC WHEN EXECUTED WITHIN THE POST
# IMPORT HOOK! The preceding is true at least with Epic 4.4K (ATI30960). This
# function isolates the workaround. The function behaves similar to Epic's
# split command in the respect the caret must be in the correct spot in the
# current doc. Compare $main::status to know if a call to this function was
# successful.
#
# THIS WORKAROUND HAS A DRAWBACK: The oids of elements that end up being cut
# and pasted elsewhere are no longer valid.
#
function split( workaroundATI30960 = uOid::WORKAROUND_ATI30960 )
{
if ( workaroundATI30960 )
{
local name = oid_name( oid_caret() );
# Cut residual element content into paste buffer
clear_mark all;
mark -noinvert begin;
goto_oid( oid_caret(), -1 );
mark end;
delete_mark bufSplitCmd;
if ( main::status != 0 ) { return };
# Move past end tag
forward_char( 1 );
if ( main::status != 0 ) { return };
# Create new element
insert_tag $name;
if ( main::status != 0 ) { return };
# Paste content
paste bufSplitCmd;
if ( main::status != 0 ) { return };
# Place caret at beginning of new tag
goto_oid( oid_caret() );
}
else
{
split;
}
}