/*REXX*/ /* TRACE R */ /*----------------------------------------------------------------- Use this macro to call Windows calculator - calc.exe Works in SPFPRO and SPFPC40 in a DOS Window To do the same in SFPSE: 1. Create a USER command called CALC calling calc.exe uncheck interpret, stop, batch 2. Cut and Paste following code into the macro folder as calc.c //----------------------------------------------------------------------------- // Calls Windows Calculator - Setup USER Command CALC calc.exe no interpret/stop/batch //----------------------------------------------------------------------------- void calc(void) { spfservice("cmd","USER CALC"); } // calc Format: CALC By Mark McDonald -------------------------------------------------------------------*/ /*--- Determine IF SPFPRO, SPFPC v4.x or Stand-alone REXX Interpreter ---*/ parse version name level date1 date2 date3 /*-- Determine which REXX interpreter is being used ---*/ TSPF = 0 /* Using a stand-alone REXX Interpreter */ IF date3 = 1995 THEN TSPF = 4 /* Using SPFPC v4 */ IF date3 = 1996 THEN TSPF = 5 /* Using SPFPRO */ IF date3 = 2007 THEN TSPF = 6 /* Using OOREXX */ /*--- If source has not been saved, save it ---*/ IF TSPF = 4 | TSPF = 5 THEN DO 'ISREDIT MACRO(PARMS)' 'ISREDIT (MODIFIED) = DATA_CHANGED' IF (MODIFIED=YES) THEN 'ISREDIT SAVE' END /*--- Call Windows Calculator ---*/ CALL TOSCMD TSPF, ' c:\windows\system32\calc.exe' EXIT 0 /*-- Pass Command to OS -----------------------------------------------------------------------------*/ TOSCMD: PROCEDURE PARSE ARG TSPF, TCMD IF TSPF = 0 THEN ADDRESS COMMAND TCMD /*DOSREXX*/ IF (TSPF = 4 | TSPF = 5) THEN ADDRESS DOS TCMD /*SPFPC4/SPFPRO - Delete if using OOREXX*/ IF TSPF = 6 THEN TCMD /*OOREXX/R4*/ RETURN /*---------------------------------------------------------------------------------------------------*/