Home · Articles · Downloads · Hobby Wear · Forums · Web Links · News CategoriesTuesday, April 23, 2024
Navigation
Home
Articles
Downloads
Hobby Wear
FAQ
Forums
Web Links
News Categories
Contact Us
Photo Gallery
OpenVMS Bigot
Search
Users Online
Guests Online: 2
No Members Online

Registered Members: 7,708
Newest Member: nifseg
Sponsors
Island Computer
View Thread
OpenVMS Hobbyist Program | Hobbyists and OpenVMS | How I Use OpenVMS
Author set noon does not act as expected
Micha
Member

Posts: 16
Joined: 16.12.06
Posted on January 20 2007 01:34
Hi,

I am still a beginner with VMS. Currently I am doing some execises based on a textbook*) and came accross a system behavior which i do not understand.

In the example the statement "set noon" is used to temporarily disable error detection. As described in the book, this would be useful if one wants to delete some temporary files and it is not sure if they are really there. I tried a command procedure test.com with the following contents:

$ ! deletion of certain temporary files
$ say := write sys$output
$ !
$ set noon
$ delete/nolog for*.dat;*
$ set on
$ !
$ say "the procedure made it to this point"
$ exit

Now this command procedure does not behave as I would expect it. No matter if I have the "set noon" statement enabled or disabled - I always get an error message if there are no matchin files. And the procedure always makes it to the following output statement instead of exiting on the error.

Could anyone of the more experienced VMS guys explain what is wrong with that?

Kind Regards,

Micha

-----
*) the book I am practising with: Michael D. Duffy, Getting started with OpenVMS
Edited by imiller on March 13 2008 00:42
Author Re: set noon does not act as expected
brad
Member

User Avatar

Posts: 134
Location: Hopedale, MA USA
Joined: 15.12.05
Posted on January 20 2007 03:28
[quote:fb45e080f9="Micha"]Hi,

I am still a beginner with VMS. Currently I am doing some execises based on a textbook*) and came accross a system behavior which i do not understand.

In the example the statement "set noon" is used to temporarily disable error detection. As described in the book, this would be useful if one wants to delete some temporary files and it is not sure if they are really there. I tried a command procedure test.com with the following contents:

$ ! deletion of certain temporary files
$ say := write sys$output
$ !
[b:fb45e080f9]$ set noon[/b:fb45e080f9]
$ delete/nolog for*.dat;*
$ set on
$ !
$ say "the procedure made it to this point"
$ exit

Now this command procedure does not behave as I would expect it. No matter if I have the "set noon" statement enabled or disabled - I always get an error message if there are no matchin files. And the procedure always makes it to the following output statement instead of exiting on the error.

Could anyone of the more experienced VMS guys explain what is wrong with that?
[/quote:fb45e080f9]

Hi Micha,

Look at the following example:

$ type foo.dat
$ ! deletion of certain temporary files
$ on warning then exit
$ say := write sys$output
$ !
$! set noon
$ delete/nolog for*.dat;*
$! set on
$ !
$ say "the procedure made it to this point"
$ exit

$ @foo.dat
%DELETE-W-SEARCHFAIL, error searching for USER2:[brad]for*.dat;*
-RMS-E-FNF, file not found

Please note the "on warning then exit" statement, and the *FIRST* warning message. DCL is not acting on the *SECOND*, fatal error message, but only on the initial *WARNING* error message.

"On error then exit" is the default DCL behavior. SET ON and SET NOON modify this behavior. Try some more experimenting and keep up the questions! Good luck learning!
http://www.turquoisewitch.com/~bradh
Author
Micha
Member

Posts: 16
Joined: 16.12.06
Posted on January 20 2007 05:58
Thanks a lot for the reply!

that encouraged me to do some more testing.

There ist still one detail which I do not fully understand:

There are commands that produce an error (e.g. attempts to delete a nonexisting file) but a command procedure will still continue, even without a preceding "set noon"

Other commands also produce an error (e.g. an attempt to run a noexisting executable "run junk"smiley, in that case the command procedure will exit.

Is there a logic behind that distinctive behavior?

Kind Regards

Micha

---
my current test example:


[code:1:760853bc95]
$! Test Procedure for Error Handling
$!
$ say := write sys$output
$ MSGOFF := set message /nofacility/noident/noseverity/notext
$ MSGON := set message /facility/ident/severity/text
$!
$ say "Hi out there..."
$! temporarily disable error detection and error messaging
$ set noon
$ MSGOFF
$ run junk ! which is not there
$ delete/nolog for*.dat;* ! no files for*.dat exist
$ MSGON
$ set on
$!
$ show time
$ say "the procedure survived all errors"
$ exit
[/code:1:760853bc95]
Author Re: set noon does not act as expected
HobbyistOne
Super Administrator

User Avatar

Posts: 126
Location: Plano, TX
Joined: 20.02.08
Posted on January 21 2007 06:02
[quote:e7a8aee4f3="Micha"]Hi,

I am still a beginner with VMS. Currently I am doing some execises based on a textbook*) and came accross a system behavior which i do not understand.
[/quote:e7a8aee4f3]

SET NOON changed how error [i:e7a8aee4f3]handling[/i:e7a8aee4f3] works, not error reporting. SET NOON will prevent an error from terminating the command procedure.

If you want to disable error reporting, you can do two things:

1) Put the command "$ DEFINE /USER SYS$ERROR NLA0:" just before the DELETE command, which will route error messages to the bitbucket.

2) SET MESSAGE/NOFACILITY/NOSEVERITY/NOTEXT/NOIDENTIFICATION will turn off all error, warning, success, etc output from all commands. $STATUS still contains the return status. You will need to do a SET MESSAGE/FAC/SEV/TEXT/IDENT to turn it back on, though!
Author RE: set noon does not act as expected
pfau
Member

Posts: 33
Location: North Brunswick, NJ
Joined: 12.03.08
Posted on March 12 2008 08:56
2) SET MESSAGE/NOFACILITY/NOSEVERITY/NOTEXT/NOIDENTIFICATION will turn off all error, warning, success, etc output from all commands. $STATUS still contains the return status. You will need to do a SET MESSAGE/FAC/SEV/TEXT/IDENT to turn it back on, though!


Best to save the prior settings and restore them afterward. Newer versions of VMS allow detection of current message settings with F$ENVIRONMENT("MESSAGE").

$ old_msg = f$environment("message")
$ set message /nofacility /noseverity /noidentification /notext
$ command_that_might_produce_errors
$ set message 'old_msg'
http://nbpfaus.net/~pfau/
Jump to Forum:
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Are you going to OpenVMS Boot Camp 2016?

Yes

No

You must login to vote.
Shoutbox
You must login to post a message.

malmberg
August 04 2022
No more VAX hobbyist licenses. Community licenses for Alpha/IA64/X86_64 VMS Software Inc. Commercial VMS software licenses for VAX available from HPE.

ozboomer
July 20 2022
Just re-visiting.. No more hobbyist licenses? Is that from vmssoftware.com, no 'community' licenses?

valdirfranco
July 01 2022
No more hobbyist license...sad

mister_wavey
February 12 2022
I recall that the disks failed on the public access VMS systems that included Fafner

parwezw
January 03 2022
Anyone know what happened to FAFNER.DYNDS.ORG? I had a hobbyist account here but can longer access the site.

gtackett
October 27 2021
Make that DECdfs _2.1A_ for Vax

gtackett
October 27 2021
I'm looking for DECdfs V2.4A kit for VAX. Asking here just in case anyone is still listening.

MarkRLV
September 17 2021
At one time, didn't this web site have a job board? I would love to use my legacy skills one last time in my career.

malmberg
January 18 2021
New Hobbyist PAKs for VAX/VMS are no longer available according to reports. Only commercial licenses are reported to be for sale from HPE

dfilip
January 16 2021
Can someone please point me to hobbyist license pak? I'm looking for VAX/VMS 7.1, DECnet Phase IV, and UCX/TCPIP ... have the 7.1 media, need the license paks ... thanks!

Bart
October 16 2020
OpenVMS, and this website!

malmberg
September 05 2020
VSI community non-commercial licenses for AXP/IA64 are available now.

malmberg
September 05 2020
See the forum about licensing. Don't know if HPE hobby licenses still being issued. Commercial licenses still being sold.

silfox70
September 01 2020
I need the license for OpenVMS7.3. Where can I find them?

malmberg
August 29 2020
Eisner, which is currently being moved, got an SSH update and the keys were updated to more modern encryption standards.

Shoutbox Archive