Re: Can I run the DOS FC command from Rexx?



In Message-ID:<61bpq4dmcv5nqo8kjutf6s9v1igrod55u1@xxxxxxx>,
Three Lefts <spamtrap@xxxxxxxxxxxxxxxxx> wrote:

I tried to execute the DOS FC (file compare) command from a Rexx exec.
I keep getting a weird return code.

I tried

'FC /B' fid1 fid2

and

Address command 'FC /B' fid1 fid2

In both cases, Result is set to "READY:".

I would like to get a return code that indicates whether the two files
are identical at the bit level.

Here's a snippet from mine:

oldtrace = trace("O")
'fc "' || file1 || '" "' || file2 || '" > f:\diff'
exitcode = rc
trace oldtrace

if exitcode = "RC" | exitcode = 0 then
do
'type f:\diff'
exit 0
end
if exitcode < 2 then 'list f:\diff'

exit rc

--
Arthur T. - ar23hur "at" intergate "dot" com
Looking for a z/OS (IBM mainframe) systems programmer position
.



Relevant Pages

  • Re: Can I run the DOS FC command from Rexx?
    ... Three Lefts wrote: ... if exitcode < 2 then 'list f:\diff' ...
    (comp.lang.rexx)
  • Re: If/then style question
    ... When I started learning Python, I wrote a lot of methods that looked like ... exitCode = good1 ... you've got multiple exit points already. ... As PEP 20 says, "Readability counts". ...
    (comp.lang.python)
  • Application ExitCode
    ... Is there anyway to specify an application ExitCode ... I've created a Windows Script that opens the MDB ... exit, storing the objects exitcode. ...
    (microsoft.public.access.modulesdaovba)
  • Re: If you were inventing CoBOL...
    ... >Consider the effect of 'returning an exit status' to MS-DOS ... Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As ... REM process here a null exit code ... If the process has not finished, the ExitCode property returns 0. ...
    (comp.lang.cobol)
  • Re: If/then style question
    ... exitCode = good1 ... Then you get the more readable style of the ... check/exit style, plus the advantage of a single exit (it's easy to ... verify visually that all the required cleanup is happening). ...
    (comp.lang.python)