| Author |
Message |
alyciac@aol.com *nix forums beginner
Joined: 12 Jul 2006
Posts: 1
|
Posted: Wed Jul 12, 2006 7:23 pm Post subject:
Number of consecutive failures allowed in batch job?
|
|
|
I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
Any thoughts would be welcome! |
|
| Back to top |
|
 |
norm.raphael@metso.com *nix forums Guru Wannabe
Joined: 02 Jun 2005
Posts: 227
|
Posted: Wed Jul 12, 2006 7:51 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
$ HELP ON
and
$ HELP SET ON
Example
$ SET NOON
$ DELETE *.SAV;*
$ SET ON
$ COPY *.OBJ *.SAV
This command procedure routinely copies all object modules
into new files with the file type .SAV. The DELETE command
first deletes all existing files with the .SAV file type, if
any. The SET NOON command ensures that the procedure continues
executing even if there are no files with the .SAV file type
in the current directory. Following the DELETE command, the SET
ON command restores error checking. Then the COPY command makes
copies of all existing files with .OBJ file type.
alyciac@aol.com wrote on 07/12/2006 03:23:14 PM:
| Quote: | I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
Any thoughts would be welcome!
|
|
|
| Back to top |
|
 |
Richard B. Gilbert *nix forums Guru
Joined: 21 Feb 2005
Posts: 456
|
Posted: Wed Jul 12, 2006 7:51 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
alyciac@aol.com wrote:
| Quote: | I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job?
|
Not that I know of. The default is to exit on the first error. If you
want to avoid the errors, you could test for the existance of the file
before trying to delete it.
Or, if the nonexistance of the file is an error, you can trap the error
with ON ERROR THEN ....
and try to do something intelligent.
If you want to ignore the error, you can either SET NOON or code your
error handling to ignore the RMS-E-FNF; you'll have to grub around to
find the numeric code for the message, check $STATUS for that code, and
resume processing. If you want to get really fancy, you can mask off
the low order three bits of $STATUS so as to trap F, E, and W severities.
DCL allows you to do just about anything you want if you want to work at
it hard enough.
<snip> |
|
| Back to top |
|
 |
Syltrem *nix forums Guru Wannabe
Joined: 02 May 2005
Posts: 131
|
Posted: Wed Jul 12, 2006 8:08 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
"Richard B. Gilbert" <rgilbert88@comcast.net> wrote in message
news:EMGdne7Q9pZCzyjZnZ2dnUVZ_ridnZ2d@comcast.com...
| Quote: | alyciac@aol.com wrote:
I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job?
|
No there isn't a number of errors before "quit".
Be careful with a ON ERROR THEN GOTO...
in the error trap, you have to issue this ON ERROR command again before you
go back to your processing (after doing something to deal with the error -
writing a message to the user possibly) or else it will exit, as you cannot
hit an error again, while still in you error trap (or what DCL thinks you
are). DCL would exit in such a condition.
| Quote: | Not that I know of. The default is to exit on the first error. If you
want to avoid the errors, you could test for the existance of the file
before trying to delete it.
Or, if the nonexistance of the file is an error, you can trap the error
with ON ERROR THEN ....
and try to do something intelligent.
If you want to ignore the error, you can either SET NOON or code your
error handling to ignore the RMS-E-FNF; you'll have to grub around to find
the numeric code for the message, check $STATUS for that code, and
|
Instead of finding the numeric value, use
$ if f$mess($status,"ident,severity,facility") .eqs. "%DELETE-W-SEARCHFAIL"
then (whatever)
| Quote: | resume processing. If you want to get really fancy, you can mask off the
low order three bits of $STATUS so as to trap F, E, and W severities.
|
Again, f$mess($status, "severity")
| Quote: |
DCL allows you to do just about anything you want if you want to work at
it hard enough.
snip
|
Syltrem |
|
| Back to top |
|
 |
Bob Gezelter *nix forums addict
Joined: 22 Jul 2005
Posts: 50
Location: Flushing, New York
|
Posted: Wed Jul 12, 2006 8:52 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
alyciac,
It is common for a utility to issue multiple error messages, yet
actually only signal an error to the outer level when it completes.
Without the log (and the command files) it is difficult to speculate
what precisely happened.
- Bob Gezelter, http://www.rlgsc.com |
|
| Back to top |
|
 |
dphill46@netscape.net *nix forums Guru Wannabe
Joined: 20 Sep 2005
Posts: 100
|
Posted: Wed Jul 12, 2006 8:57 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
alyciac@aol.com wrote:
| Quote: | I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
Any thoughts would be welcome!
|
You could use the f$search lexical to verifiy the file exists.
See $HELP LEX F$SEARCH
ie.
using specific file names:
$ filespec = f$search("filename01.ext")
$ if filespec .nes "" then delete 'filespec'
$! etc...
or,
$ if f$search("filename01.ext") .nes. "" then delete filename01.exe;*
$! etc...
Or, with wildcards in a loop:
$d_loop:
$ filespec = f$search("file*.tmp;*")
$ if filespec .nes. ""
$ then
$ delete 'filespec'
$ goto d_loop
$ endif
$ exit
In any case, using $SET NOON and/or $ON condition THEN ... in a command
file and doing your own error checking during critical steps is a good
practice to follow.
Also, unless you submit the job with /NOLOG_FILE or do a $SET NOVERIFY
at the beginning of the .com file(s), the log file should show you what
problem it's having where. |
|
| Back to top |
|
 |
JF Mezei *nix forums Guru
Joined: 21 Jul 2005
Posts: 2556
|
Posted: Wed Jul 12, 2006 11:41 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
If you want your batch job to continue despite any number of errors, you
need to convince the error handler to take a lunch break and not stop
your job :
$SET NOON
If you use the ON ERROR or ON WARNING mechanisms, they are like a
catapult. They remain "loaded" until an error happens at which point
their handling is triggered. But once triggered, the are no longer
active and you need to re-issue an ON ERROR or ON WARNING again.
You can isseu ON ERROR /ON WARNING multiple times and each one overrides
the previous one. |
|
| Back to top |
|
 |
AEF *nix forums Guru
Joined: 27 Jul 2005
Posts: 516
|
Posted: Thu Jul 13, 2006 12:57 am Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
alyciac@aol.com wrote:
| Quote: | I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
Any thoughts would be welcome!
|
It would really help a lot if you'd post an example of the problem.
Perhaps you're counting "suberrors" as errors, the ones starting with a
hyphen instead of a percent sign. |
|
| Back to top |
|
 |
Dave Weatherall *nix forums Guru Wannabe
Joined: 27 Jul 2005
Posts: 108
|
Posted: Thu Jul 13, 2006 5:43 am Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
On Wed, 12 Jul 2006 19:23:14 UTC, alyciac@aol.com wrote:
| Quote: | I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
Any thoughts would be welcome!
|
I usually precede a command that could go wrong, and which would _not_
be fatal, with
$ ON EROR THEN CONTINUE
That allows the next error to be accepted and processing will
continue. There are dangers of course; so remembering to re-establish
error trapping with SET NOON can then be necessary.
--
Cheers - Dave W. |
|
| Back to top |
|
 |
Bob Koehler *nix forums Guru
Joined: 25 Jul 2005
Posts: 1078
|
Posted: Thu Jul 13, 2006 5:41 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
In article <1152732194.011468.9030@s13g2000cwa.googlegroups.com>, alyciac@aol.com writes:
| Quote: | I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
|
See the $SET ON command. The default action after a severe error
is EXIT. Not finding files should return RMS-F-FNF ("-F-" indicates
a severe error). |
|
| Back to top |
|
 |
dphill46@netscape.net *nix forums Guru Wannabe
Joined: 20 Sep 2005
Posts: 100
|
Posted: Thu Jul 13, 2006 7:36 pm Post subject:
Re: Number of consecutive failures allowed in batch job?
|
|
|
Bob Koehler wrote:
| Quote: | In article <1152732194.011468.9030@s13g2000cwa.googlegroups.com>, alyciac@aol.com writes:
I'm running a VMS 6.1 system. Last weekend, I had a batch job stop
after trying and failing to delete 24 files. (This is not a protection
issue - the files just were not there to be deleted) There is nothing
in my error trapping that calls for such an action. Is there some sort
of maximum number of consecutive errors, after which the system will
terminate a job? The batch job in question is a series of DCL command
procedures which execute one after another. After the proc with the
deletes failed, the 'parent' proc continued with its cleanup and sent
mail announcing the failure, so the process didn't simply stop.
See the $SET ON command. The default action after a severe error
is EXIT. Not finding files should return RMS-F-FNF ("-F-" indicates
a severe error).
|
$type test.com
$ set verify
$ set on
$ delete noexist.fil;*
$ delete doexist.fil;*
$ write sys$output "end of job"
$
$@test.com
$ set on
$ delete noexist.fil;*
%DELETE-W-SEARCHFAIL, error searching for DKA0:[TEST]NOEXIST.FIL;*
-RMS-E-FNF, file not found
$ delete doexist.fil;*
$ write sys$output "end of job"
end of job |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|