[Info-vax] DCL: Restrictions to READ loop process?

BaxterD at tessco.com BaxterD at tessco.com
Fri Sep 18 11:03:51 EDT 2009


On Sep 16, 4:50 pm, Jan-Erik Söderholm <jan-erik.soderh... at telia.com>
wrote:
> JF Mezei wrote:
> > Robb wrote:
>
> >> Adding SET VERIFY like JF Mezei recommended, I see that the process
> >> errors out if the file I'm asking it to copy doesn't exist.
>
> > You can add:
>
> > $ON ERROR THEN GOTO label
>
> > Before a command you suspect could generate errors.
>
> > The "ON" command is not permanent. Once it has been triggfered by an
> > error, you need to re-issue the command.
>
> > Another possibility is $SET NOON which causes the DCL file to continue
> > executing even if it encounters errors.
>
> And the *best* solution is of course to make sure that the COPY
> command never generates any error, as far as it is possible. In
> this case it's simply a case of using F$SEARCH on the file and
> not try the COPY command att all if the file isn't there...- Hide quoted text -
>
> - Show quoted text -

The approach recommended by J-E above, is the correct way to go.
Modify your conditional statement to something like

$       if (f$search("<filename>",) .nes. "") .AND. ( <original
condition>) then ....

Dave



More information about the Info-vax mailing list