Date:         Fri, 4 Aug 1995 08:27:20 -0700
Reply-To:     The NOMAD2 Discussion List
Sender:       The NOMAD2 Discussion List
From:         Jerry Knowles
Subject:      Re: Database does not exist
In-Reply-To:  "Mail dated 95/08/04 15:07:54 UT from (NOMAD2-L) The NOMAD2
              Discussion List"

Hi Alan,

  I recently had to do the same thing for the first time on some of
my NOMAD procedures.  Here's how I accomplished it:

ON FATAL DO;
       SYS EXEC ICLINK ABC123;
       DA FRED;
END;
DA FRED;

ON FATAL MSG;


 Explanation:  Unfortunately, when a database cannot be activated,
NOMAD generates an error which falls into the fatal category, so any
ON ERROR conditions you have in effect will not trap this error.
ON FATAL functions in a similar fashion to ON ERROR, but stays in
effect for FATAL error conditions.
   Make sure to issue the ON FATAL MSG, which reverts the FATAL
processing to normal, as soon as you can after the DA command.
(Steve Paylor pointed this out to me)

Good Luck,
Jerry D. Knowles II
ASIC Business Systems


>___Original Letter _______________________________________
>Date: 04 Aug 1995 06:40:52 -0700
>Sender:   The NOMAD2 Discussion List           (NOMAD2-L)
>From:     Alan Long                            (TICS28)
>To:       Multiple recipients of list NOMAD2-L (NOMAD2-L)
>Reply-To: The NOMAD2 Discussion List           (NOMAD2-L)
>Subject: Database does not exist
>
>I am using NOMAD version 6.00 on VM/CMS.
>
>If I run a procedure containing the command:
>         DA FRED;
>
>and database FRED does not exist, my procedure crashes with the
>error message: DAT0079: Database FRED SIT2 not found.
>
>This is not very friendly to the user. I would like to do something
>like:
>        DA FRED OTW DO;
>                       SYS EXEC ICLINK ABC123;
>                       DA FRED;
>                    END;
>
>but this does not work since Nomad expects a semicolon after DA FRED;
>
>     I could call a REXX exec prior to the DA call, and check if the user
>is linked to the required disk, but I'd prefer not to do this.
>
>     Anyone got any ideas how to insert a trap to do what I want?
>
>Regards,
>Alan Long
>           Motorola, East Kilbride, Scotland
>           e-mail TICS28@WACCVM.CORP.MOT.COM
>___End of Original Letter_________________________________
back to index