Edit macro UNGML Edit macro UNGML Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- Macro name. UNGML users. SCRIPT users type. Edit Macro resides in SYS1.TSOCLIST, and in IS03.SPF2.MACROS for use on SPF/PC -------------------------------------------------------------------------------- UNGML Creates GML text from non-gml text, or reverses the process. -------------------------------------------------------------------------------- related @SCRIPT GML -------------------------------------------------------------------------------- The UNGML edit macro is designed to create GML text from a non-GML document, such as placing JCL into a SCRIPT document. -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. ISREDIT UNGML (there are no other operands) -------------------------------------------------------------------------------- (no operands) to GML text from text such as JCL. Converts REVERSE Reverses the process by removing additions that this edit macro normally creates. Examples: UNGML UNGML REVERSE Notice: AUTOSAVE OFF is invoked Internal Aspects: The entire edit macro is very fairly short and is included be- low for your perusal. Within the edit macro the use of "&&&&" is equivalent to your typing "&". 1. Ampersands("&") are converted to the "&." symbol. 2. Semicolons(";") are converted to the "&semi." symbol. 3. Colons(";") are converted to the "&:" symbol. This is done in two phases so as not to interfere with other conversions. 4. End of line use of a hyphen are protected by adding a suffix of "&rbl." which is the required blank. Addition will prevent concatenation of line before formatting takes place. 5. Periods(".") at the beginning of a line and after a semi-colon(";") are con- verted to the "&period." symbol. 6. All semi-colons are converted to the "&semi." symbol. ISREDIT MACRO (REVERSE) CONTROL ASIS IF REVERSE = &SYSCAPS(&REVERSE) THEN GOTO UNDOIT IF REVERSE = &SYSCAPS(&REVERSE) THEN GOTO UNDOIT ISREDIT C ALL .A .B '&&&&' '&&&&.' ISREDIT C ALL .A .B ':' '?#?' ISREDIT C ALL .A .B '- ' '-&rbl. ' ISREDIT C ALL .A .B '- ' '-&rbl. ' ISREDIT C ALL .A .B 'ª' '&&&¬.' ISREDIT C ALL .A .B 1 '.' '&&&&period.' ISREDIT C ALL .A .B ';.' ';.&&&&period.' ISREDIT C ALL .A .B '?#?' '&&&&gml.' ISREDIT C ALL .A .B ';' '&&&&semi.' EXIT CODE(0) EXIT CODE(0) UNDOIT: - ISREDIT C ALL .A .B '&&&&semi.' ';' ISREDIT C ALL .A .B '&&&&gml.' ':' ISREDIT C ALL .A .B ';..&&&&period.' ';.' ISREDIT C ALL .A .B 1 '&&&&period.' '.' ISREDIT C ALL .A .B ' &&&&period.' '.' ISREDIT C ALL .A .B '-&rbl. ' '- ' ISREDIT C ALL .A .B '-&rbl. '- ' ISREDIT C ALL .A .B '&&&¬.' 'ª' ISREDIT C ALL .A .B ':' ':' ISREDIT C ALL .A .B '&&&&.' '&&&&' EXIT CODE(0)