.;
.;	BALLSUP.CMD - establish cause of an error.
.;
.; call:@[1,2]ballsup/lo p1 p2:p9
.;
.; in:	<filerr>	last FCS error. >= 0 is OK
.;	<filer2>	last FCS sub-error
.;	<exstat>	last program/@file error
.;	p1		a command to execute if there is an error
.;	p2:9		What we were trying to do
.;
.; do:			print a winge if it failed.
.;			failures are from <filerr> or <exstat>
.;
.; out:	<exstri>	error explanation.
.;	<exstat>	1 = OK, else <exstri> has error text
.;
.enable substitution
.parse comman " " junk panic explan
.if <exstat> = 1 .goto ok1
.sets <exstri> "error number '<exstat>'"
;
; I can''t do 'explan' because "'<exstri>'".
;
'panic'
.exit <warnin>
.ok1:
.if <filerr> >= 0 .goto ok2
.setn errcod 377&<filerr>
@lb:[1,2]indsys/lb:qioerr 'errcod'
;
; I can''t "'explan'" because "'<exstri>'":'<filer2>'.
;
'panic'
.exit <warnin>
.ok2:
.exit <succes>
