[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

174.0. "ERROR TRAPPING" by EFGV01::HOOG () Fri Jan 27 1989 05:43

Is it possible in FOCUS to do error trapping ?

Using &IORETURN it is possible to detect errors in Dialogue Manager 
read/write operations and &RETCODE gives the error status of a VMS command.
But I would like to detect an error in a TABLE request or a MATCH request
to terminate programs in a batch job in a controlled way, so without lots 
of error messages caused by following TABLE requests which can't execute 
because of non-existing HOLD-files. This would also give us the opportunity,
if an error occures, to display special information in the log-file and to 
ring some warning bells.

Does anyone know how to do this?

Rgrds,                   
      Andr� van 't Hoog
T.RTitleUserPersonal
Name
DateLines
174.1note 153MEMV01::COPPERSMITHSYSTEM-W-RELFLT, reality faultTue Jan 31 1989 16:131
    See note 153.
174.2ANOTHER WAYFDCV10::MADDENThu Feb 16 1989 11:0526
    Another way,
    
    TABLE FILE ...
    ...
    END
    ? STAT
    -RUN
    -IF &READS EQ 0 GOTO NO_RECS;
    -ALLDONE
    -QUIT FOCUS 55
    -*
    -NO_RECS
    -QUIT FOCUS 99
    
        In the DCL routine
    $ RETURN_CODE = %X'$STATUS'
    $ IF RETURN CODE .EQS. 55  do something
    $ IF RETURN_CODE .EQS. 99 do something
    
        The above can be altered to help in MODIFY situations by looking
    at &ACCEPTS or some of the other statistical variables.  Also you
    
    can write & stats to a file and read them in DCL procedure to have
    double error check.
    
    Also note 153 is another way.
174.3Use &LINES for MATCHTHRILL::WILSJoris WilsWed Feb 21 1990 16:2119
    I couldn't get the method in 153 to work, because it isn't clear to
    me how &RETCODE works. Also when you do a MATCH &READS is not set. 
    &LINES is.
    
    So for reporting on MATCH or TABLE I use a separate FEX:
    MATCH FILE  (or TABLE FILE)
    :
    :
    END
    EX ERRREAD
    
    --------------------
    -* ERRREAD.FEX
    -IF &LINES EQ '0' THEN GOTO ERRREAD;
    -EXIT
    -*
    -ERRREAD
    -VMS DEFINE/JOB FEX$STAT 1
    -EXIT