Operating System - OpenVMS
1828227 Members
3432 Online
109975 Solutions
New Discussion

Re: Submiting a batch job to run automatically twice a year

 
SOLVED
Go to solution
Walter Miller_1
Valued Contributor

Re: Submiting a batch job to run automatically twice a year

If you do not have a

SET NOON or
ON condition THEN ...

in your command procedure then see HELP ON and look at the examples to see how best to implement error processing.
Steve ward_3
Advisor

Re: Submiting a batch job to run automatically twice a year

I have attached the com file and here is what I get when running it


@WARD.COM
DAY = "Thursday"
MONTH = "04"
%SUBMIT-F-OPENIN, error opening $1$DUA1:[WARD]TREK_SNAPSHOT.COM; as input
-RMS-E-FNF, file not found
Walter Miller_1
Valued Contributor

Re: Submiting a batch job to run automatically twice a year

HELP LEXCICAL F$SEARCH is your friend. If the funtion does not find the file it returns "". Your logic says if the file is not there then submit. You can change ".eqs." to ".nes." and it should work.
Walter Miller_1
Valued Contributor

Re: Submiting a batch job to run automatically twice a year

Fumble finger...LEXICAL
Jan van den Ende
Honored Contributor

Re: Submiting a batch job to run automatically twice a year

Steve,

>>>
if (f$search("$1$DUA1:[WARD]:''node'_snapshot.com") .eqs. "")
<<<

The colon (":") between [ward] and ''node'
is incorrect.
And, the search will NEVER find a file with a syntax error.

AND, you should check your logic:
IF the file lookup is empty (CANNOT find the file
THEN submit the file
ELSE (we have found SOMETHING)
THEN report we did not find it

Are you REALLY sure that this is the EXACT procedure? I would have expected an error on the SUBMIT statement...

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Steve ward_3
Advisor

Re: Submiting a batch job to run automatically twice a year

Yes here it is when the file is in the firectory

TREK >>@ward.com
DAY = "Thursday"
MONTH = "04"
Job TREK_SNAPSHOT (queue DBA$BATCH, entry 187) pending
pending status caused by queue stopped state
Steve ward_3
Advisor

Re: Submiting a batch job to run automatically twice a year

SO YOU SEE IT DOES DO THE SUBMIT WHEN THE FILE IS THERE! BUT WHEN IT CAN'T FIND IT I GET THAT ERROR?


%SUBMIT-F-OPENIN, error opening $1$DUA1:[WARD]TREK_SNAPSHOT.COM; as input
-RMS-E-FNF, file not found

Walter Miller_1
Valued Contributor

Re: Submiting a batch job to run automatically twice a year

Of course...as Jan said even if the file is there the extra ":" between ] and ''ward will cause the f$search to return "" and run the job. So remove that ":" and change .eqs. to .nes. and it should work as expected.
Steve ward_3
Advisor

Re: Submiting a batch job to run automatically twice a year

Great it did thanks for all your help
Steve ward_3
Advisor

Re: Submiting a batch job to run automatically twice a year

Thanks again