Operating System - OpenVMS
1754014 Members
7694 Online
108811 Solutions
New Discussion юеВ

Submiting a batch job to run automatically twice a year

 
SOLVED
Go to solution
Steve ward_3
Advisor

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

Okay, here I go again

Why doesn't it submit the job when it find the com file that I am searching for??

It just gives me file is miising, but it isn't!



$ if (f$search("home_scr:'node'_snapshot.com") .eqs. "")
$ then
$ write sys$output "SNAPShot.COM file missing! Program will NOT run."
$ goto the_end
$ else
$ SUBMIT/NOPRINT/QUE=sys$BATCH/LOG=home_LOGS:home_scr:[SCRIPTS]'node'_SNAPSHot.COM
Duncan Morris
Honored Contributor

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

Steve,

read Jan's comments again!

Inside a quoted string (such as in your IF statement), you need two apostrophes to begin symbol substitution.

Therefore you need apostrophe apostrophe node apostrophe.

See the attached text file for details

Duncan
Steve ward_3
Advisor

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

Thanks the submit worked when it found that file, but when it doesn't I get a message
%SUBMIT-F-OPENIN, error opening $1$DUA1:[ward]Trek_SNAPSHOT.COM; as input
-RMS-E-FNF, file not found

Instead of the
write sys$output "SNAPSHRINK.COM file missing! Program will NOT run."

So if it does find that file that it is searchig the submit works, but then when I delete that file and reran it, if should come up with the sys$output message?

Shouldn't it?

Jan van den Ende
Honored Contributor

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

Steve,

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

Instead of the
write sys$output "SNAPSHRINK.COM file missing! Program will NOT run."
<<<

Now _I_ am getting a little confused.

So, some questions

- WHAT is the exact name of the file you want to submit
- WHERE (device, directory) is that file located
- HOW does STEVE_WARD translate
- WHAT is the value of NODE in the context of this process (add a
$ SHOW SYMBOL NODE
and
$ SHOW LOGICAL/FULL STEVE_WARD
as the lines before the f$SEARCH)

I am beginning to think that I was put on the wrong track (derailed, actually) until now.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Walter Miller_1
Valued Contributor

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

>> I get a message
%SUBMIT-F-OPENIN, error opening $1$DUA1:[ward]Trek_SNAPSHOT.COM; as input
-RMS-E-FNF, file not found

Instead of the
write sys$output "SNAPSHRINK.COM file missing! Program will NOT run."
<<

It looks like you may not be doing any error checking. Since you got an ERROR, processing of the command procedure stopped and exited - so no "write sys$ouput"
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.