niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
· nixdoc.net · man pages · Linux HOWTOs · FreeBSD Tips · Forums
navigation Forum index » Not Unix » VMS
Number of consecutive failures allowed in batch job?
Post new topic   Reply to topic Page 1 of 1 [11 Posts] View previous topic :: View next topic
Author Message
alyciac@aol.com
*nix forums beginner


Joined: 12 Jul 2006
Posts: 1

PostPosted: Wed Jul 12, 2006 7:23 pm    Post subject: Number of consecutive failures allowed in batch job? Reply with 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
norm.raphael@metso.com
*nix forums Guru Wannabe


Joined: 02 Jun 2005
Posts: 227

PostPosted: Wed Jul 12, 2006 7:51 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

$ 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

PostPosted: Wed Jul 12, 2006 7:51 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Wed Jul 12, 2006 8:08 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

"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

PostPosted: Wed Jul 12, 2006 8:52 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Wed Jul 12, 2006 8:57 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Wed Jul 12, 2006 11:41 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Thu Jul 13, 2006 12:57 am    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Thu Jul 13, 2006 5:43 am    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Thu Jul 13, 2006 5:41 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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

PostPosted: Thu Jul 13, 2006 7:36 pm    Post subject: Re: Number of consecutive failures allowed in batch job? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] View previous topic :: View next topic
The time now is Thu Sep 09, 2010 11:46 am | All times are GMT
navigation Forum index » Not Unix » VMS
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Find out the number of emails sent out chrislo2004 Postfix 0 Wed Jul 28, 2010 3:38 am
No new posts number of words in a line Fred J. C++ 3 Fri Jul 21, 2006 3:52 am
No new posts Since there was talk of if-then-else not being allowed in... Casey Hawthorne python 5 Fri Jul 21, 2006 3:41 am
No new posts way to ignore pga_aggregate_target for a batch job? NetComrade Server 3 Thu Jul 20, 2006 6:07 pm
No new posts output number mm.omid@gmail.com C++ 1 Thu Jul 20, 2006 5:09 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum |  email marketing service
 
Sponsors: Internet advertising | Free Online Greeting Cards : Meme4u | Debt Help | Breast Enlargement | Debt Help
Privacy Policy
[ Time: 0.1056s ][ Queries: 17 (0.0636s) ][ GZIP on - Debug on ]