|
Post by GresBes@gmail.com on Aug 17, 2015 10:09:31 GMT -5
Hello All,
Have you ever wanted the equivalent functionality of the ISPF edit compare command in SPFLite? I did and with George's help I adapted the SUBMIT command to do just that!
I like to use the GnuWin32 tools so to do this you will need to install the CoreUtils and the DiffUtils packages, but you could easily achieve something similar using the standard DOS "fc" or "comp" commands (you would also have to get rid of the "tee" command and use standard redirection).
Anyway, here we go. Change the prototype submit command to: SPFSUB.BAT "~N" "~I" "~R" ~A Then create SPFSUB.BAT somewhere in your path as follows:
@rem ###################################### @rem # Process the SPFLite Submit Command # @rem ###################################### @rem 14/08/2015 Initial implementation, just handles diff for now. if "%1" == "" goto :usage if "%2" == "" goto :usage if "%3" == "" goto :usage if not "%4" == "diff" goto :usage set MGDIFFOPTS=-s if not "%5" == "" set MGDIFFOPTS=%5 diff %MGDIFFOPTS% %1 %2 2>&1 > "%TEMP%\mgdiffout.txt" echo diff rc=%ERRORLEVEL% > %3 start "" "%ProgramFiles%\Windows NT\Accessories\wordpad.exe" "%TEMP%\mgdiffout.txt" goto :EOF :usage echo Usage: %0 origfile tempfile respfile args | tee %3
Then makes some changes and try the command: sub [diff -su999] Whoop! Whoop!
Cheers,
Mick.
|
|