Kbase P60510: Rolling forward wrong AI file doesn't return expected return
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/12/2004 |
|
Status: Unverified
FACT(s) (Environment):
UNIX
FACT(s) (Environment):
Progress 9.1D
SYMPTOM(s):
Rolling forward wrong AI file doesn't return expected return code 2
Rolling forward wrong AI file returns return code 0
Using $? in script to check status of rfutil roll forward
CAUSE:
The variable $? can be used on UNIX to find out the return code for the immediately last command run, as in e.g.
rfutil sports -C roll forward -a sports.a1
echo $?
This code indicates the completion status for that command - if 0 is returned, the command completed successfully; if 2 is returned, the command failed.
If further commands come between the rfutil and the $?, the variable will no longer be testing for the rfutil, but for whatever the last command was.
FIX:
Ensure that the $? is being requested on the correct command.