Operating System - OpenVMS
1752339 Members
5682 Online
108787 Solutions
New Discussion юеВ

Re: VMS MAIL %MAIL-E-FILNOTDEL error

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

VMS MAIL %MAIL-E-FILNOTDEL error

Has anyone seen this error before ?
%MAIL-E-FILNOTDEL, error deleting SYS$SCRATCH:[UTIL.BKU]MAIL_210A_SEND.TMP;*
-RMS-F-DEV, error in device name or inappropriate device type for operation
%MAIL-E-FILNOTDEL, error deleting SYS$SCRATCH:[UTIL.BKU]MAIL_210A_EDIT.TMP;*
-RMS-F-DEV, error in device name or inappropriate device type for operation

This only reports the error when running a DCL script via batch.
Commands used is:
$ MAIL_PROCEDURE:
$set noon
$open/write mailfile tmp_mail.txt
$write mailfile "''err_msg1'"
$close mailfile
$mail/subj="Alert - OSIBK1 Backup ''status'" -tmp_mail.txt "user@mycompany.com"
$delete/nolog tmp_mail.txt;*
24 REPLIES 24
Uwe Zessin
Honored Contributor
Solution

Re: VMS MAIL %MAIL-E-FILNOTDEL error

'-RMS-F-DEV' -- I would check the logical name SYS$SCRATCH in that context. Just put one line at the top and make sure you create or logfile (or redirect the output):
$ show logical sys$scratch* /full
.
Tim Nelson
Honored Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

I will put in script and rerun..

Did you notice that the path in the error stated sys$scratch:[current_working_dir]
which is not correct.

a manual show log sys$scratch shows:
"SYS$SCRATCH" = "SYS$SYSROOT:[SYSMGR]" (LNM$JOB_81663980)
Uwe Zessin
Honored Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

Yes, I have noticed that. So either the system-wide SYLOGIN or the user's LOGIN.COM is altering the logical name.
.
Tim Nelson
Honored Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

Here is the real kicker..
I have another script that also runs via batch with same mail code and no errors.
$ MAIL_PROCEDURE:
$!MAIL SOMEBODY
$set noon
$open/write mailfile tmp_mail.txt
$write mailfile "''err_msg1'"
$close mailfile
$mail/subj="Alert - OSIBK1 BCV MERGE ''status'" tmp_mail.txt "user@mycompany.com"
$delete/nolog tmp_mail.txt;*
$ return
$!END MAIL_PROCEDURE
Doug Phillips
Trusted Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

Are you submitting the job under the SYSTEM account or using submit/user= ? Is something in the syslogin.com or the user's default login.com setting something or skipping something because of mode=batch? SYSTEM usually runs the SYS$MANAGER:LOGIN.COM file, so is there something unusual in there?

SYS$SCRATCH is defined at login time as the user's default directory and can be and usually is different for every user.

Dale A. Marcy
Trusted Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

That is the error message you would receive if Sys$Scratch has been deassigned (or never defined). Is it possible there is a branch based on an f$mode() being batch or not being interactive that could cause the logical to be deassigned in either the sylogin procedure or the user's login procedure?
Tim Nelson
Honored Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

submitted under SYSTEM using.
Here is the output after using show log sys$scratch
%SHOW-S-NOTRAN, no translation for logical name SYS$SCRATCH
%MAIL-E-FILNOTDEL, error deleting SYS$SCRATCH:[UTIL.BKU]MAIL_2259_SEND.TMP;*
-RMS-F-DEV, error in device name or inappropriate device type for operation
%MAIL-E-FILNOTDEL, error deleting SYS$SCRATCH:[UTIL.BKU]MAIL_2259_EDIT.TMP;*
-RMS-F-DEV, error in device name or inappropriate device type for operation

Hein van den Heuvel
Honored Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error



>> Dale A. Marcy Jul 29, 2004 20:15:01 GMT ->> ---------------------------------------------
>> That is the error message you would receive if Sys$Scratch has been deassigned (or never defined). Is it possible there is a branch based on an f$mode() being batch or not being interactive that could cause the logical to be deassigned in either the sylogin procedure or the user's login procedure?

Sounds good Dale!

>> Tim Nelson Jul 29, 2004 20:19:21 GMT
>>-----------------------------------------
>> submitted under SYSTEM using.
>>Here is the output after using show log sys$scratch
>> %SHOW-S-NOTRAN, no translation for logical name SYS$SCRATCH

This confirms Dale's thoughts.
Please make sure a valid sys$scratch is defined for all users (Before F$MODE() check in sylogin!)

In the mean time I check the Mail sources a little. It suggests it will only conditionally delete (wildcarded) send and endi tmp file using a global flag. In practice though it seems always to try, whether a temp file was created or not.
The code explicitly checks for 'FNF' (File Not Found) and declares victory if it received that specific error. But 'DEV' triggers the 'FILNOTDEL' condition.
So just define sys$scratch and maill will get FNF back from RMS and it will be happy.

hth,
Hein.





%MAIL-E-FILNOTDEL, error deleting SYS$SCRATCH:[UTIL.BKU]MAIL_2259_SEND.TMP;*
Volker Halle
Honored Contributor

Re: VMS MAIL %MAIL-E-FILNOTDEL error

May SYSMAN> SET ENV/NODE be involved ? SYSMAN will not have SYS$SCRATCH defined in the remote node environment.

SYS$SCRATCH is defined as a JOB-wide EXEC-mode logical name by LOGINOUT and cannot easily be deleted.

You can easily test, if some code is deleting SYS$SCRATCH by submitting a simple DCL-procedure with just a SHOW LOG/FULL SYS$SCRATCH in the same environment in which your mail procedure is run.

Volker.