SCRIPT_STATUS

This variable controls the behavior of ACCEPT FROM INPUT STATUS when the input is not attached to a terminal. If SCRIPT_STATUS has its default setting of 0 (off, false, no), an ACCEPT FROM INPUT STATUS statement will return a fixed value when the program has redirected input. The value returned is the value of the INPUT_STATUS_DEFAULT configuration variable.

When SCRIPT_STATUS is not 0, and input is redirected, then ACCEPT FROM INPUT STATUS will return the actual status of the script file (i.e., it will return "1" (on, true, yes) unless the script file has been exhausted).