/* REXX ***************************************************************/ /* -------------------------------------------------------------------*/ /* Name: ET2 (EditThis, part 2) *//*HELP*/ /* Short Will be called from ET *//*HELP*/ /* Type: REXX-Macro *//*HELP*/ /* Author: Norbert Haas & Meik Naujeck *//*HELP*/ /* Syntax: ET2 *//*HELP*/ /* Parameter: none *//*HELP*/ /* Remark: Must bee called from ET, don't use it as a macro *//*HELP*/ /* */ /* Version Author Date Why */ /* ------- ------------- ---------- --------------------------------- */ /* V02.00 Haas 30.05.2003 english version and PASTE */ /* (not VPASTE) */ /* V01.00 Haas&Naujeck 29.04.1998 Creation */ /**********************************************************************/ "ISREDIT MACRO" /* edit and view not allowed ---------------------------------------- */ "ISREDIT DEFINE EDIT DISABLED" "ISREDIT DEFINE VIEW DISABLED" /* load vars from shared pool --------------------------------------- */ "ISPEXEC VGET (etrow,etcol,etdl1,etdc1,etwc,etchg,etlabels", "etexcl) SHARED" /* init ------------------------------------------------------------- */ zedsmsg = '' IF etwc = 'YES' & etchg = 'YES' THEN DO "ISREDIT RESET" "ISREDIT DEL ALL NX" "ISREDIT PASTE et$copy" zedlmsg = 'Changes (from View) have been copied to the Editor.', 'Continue editing or use command CANCEL to abort.' END ELSE DO zedlmsg = 'Changes (from View) have not been copied to the Editor', '(ET - or no changes had been made in the View).', 'Continue editing or use command CANCEL to abort.' END zedlmsg = 'You are now using the Editor!' zedlmsg /* set labels ------------------------------------------------------- */ IF etlabels /= '' THEN DO zedlmsg = zedlmsg 'Some labels (' DO i = 1 TO WORDS(etlabels) BY 2 label = WORD(etlabels,i) line = WORD(etlabels,i + 1) "ISREDIT LABEL" line "=" label 0 zedlmsg = zedlmsg label END zedlmsg = zedlmsg ') have been set.' END /* exclude lines ---------------------------------------------------- */ IF etexcl /= '' THEN DO DO i = 1 TO WORDS(etexcl) line = WORD(etexcl,i) "ISREDIT XSTATUS" line "= X" END zedlmsg = zedlmsg 'Some lines have been excluded.' END /* locate at cursorposition ----------------------------------------- */ "ISREDIT LABEL" etdl1 "= .tmp" IF etdl1 = 1 THEN "ISREDIT LOCATE 0" ELSE "ISREDIT LOCATE .tmp" /* set cursor ------------------------------------------------------- */ IF etrow = 1 & etcol = 0 THEN et2_rc = 1 ELSE et2_rc = 0 "ISREDIT CURSOR =" etrow etcol /* message ---------------------------------------------------------- */ "ISPEXEC SETMSG MSG(isrz000)" EXIT et2_rc