Edit macro INSERT Edit macro INSERT Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- REXX execute name. INSERT users. PDF EDIT users particularly SCRIPT and text writers type. Edit Macro resides in SYS1.TSOCLIST, and in IS03.SPF2.MACROS for use on SPF/PC -------------------------------------------------------------------------------- INSERT Insert word/tag/token before cursor, optional insert after word -------------------------------------------------------------------------------- related (capitalz) gml tagx ungml gmltp -------------------------------------------------------------------------------- Created to add gml tags such as :gt12./:egt12. before and after words. For the purposes of this edit macro imbedded periods don't count as a delimiter. The ending delimiters checked for are › . < + | & ! * ; ª ª % _ > ? = ' { } otherwise known as cent(›), period(.), less than(<), plus(+), or sign(|), ampersand(&), exclamation point(!), asterisk(*), semi-colon(;), not(ª), broken bar(), per cent(%), underscore(_), grave('), greater than(>), question mark(?), equal sign(=), tilde(), left>brace({), and right>brace(}). -------------------------------------------------------------------------------- Page FIXPI-1 SYSTECH NOTICE -- CLISTS All other commonly used delimiters will not act as delimiters includ- ing periods(.) -- unless followed by a space, hyphens(-), and quotes of any kind. -------------------------------------------------------------------------------- ISREDIT INSERT token1 token2 -------------------------------------------------------------------------------- string1 A string of characters (no imbedded blanks) to be place to the left of the original cursor position. string2 (optional) A second string of characters (no imbedded blanks). to be placed at the end of the word. Word defined in text above. Examples COMMAND ====> INSERT :gt12. :egt12. 000050 Update TECH.LIBR.TEXT(member) before continuing. 000050 Update :gt12.TECH.LIBR.TEXT(member):egt12. before continuing. COMMAND ====> INSERT 'able bodied' 000050 Update TECH.LIBR.TEXT(member) before continuing. 000050 Update able bodiedTECH.LIBR.TEXT(member) before continuing. COMMAND ====> INSERT 'begin(s) ' ' ending word(s)' 000050 Update TECH.LIBR.TEXT(member) before ... 000050 Update begins(s) TECH.LIBR.TEXT(member) ending word(s) before ... Internal Aspects 1. Begin and ending quotes are removed from parameter string(s) if begin with a quote. 2. Error messages will appear if inserted string(s) will not fit within bounds. 3. Optional second string is inserted first, if present. The ending de- limiter must be found with the translate input field or a blank. linex = translate(line,' ',':,&ª~|%*_+=!›³;}{>