Computing.Net > Forums > OpenVMS > to write system errors into a file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

to write system errors into a file

Reply to Message Icon

Name: Sharitha
Date: October 12, 2004 at 05:34:43 Pacific
OS: VMS
CPU/Ram: 512
Comment:

Hi,
I want to capture the system errors and write to a file.
Eg:%DCL-E-INVEST,invalid IF-THEN-ELSE nessting structure or data inconsistency

I want to record this error in a file .Kindly help


Shari



Sponsored Link
Ads by Google

Response Number 1
Name: Hakan Andersson (by HakAnd)
Date: October 12, 2004 at 10:19:01 Pacific
Reply:

Shari,

I'm not sure I understand your wish.......

To redirect errormessages you can redefine
SYS$ERROR to point to file

$ DEFINE SYS$ERROR ERRORLOG.LIS

But if you want to check a command for success or not, VMS stores information about how a DCL-command worked in two symbols. $STATUS and $SEVERITY.

example

$ SHOW TIME
12-OCT-2004 19:08:57
$ SHOW SYMBOL $S*
$SEVERITY == "1"
$STATUS == "%X00030001"

SEVERITY = 1 means "SUCCESS"

$ WRITE SYS$OUTPUT F$MESSAGE(%X00030001)
%CLI-S-NORMAL, normal successful completion

$ THISISNOTACOMMAND
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\THISISNOTACOMMAND\

$ SHOW SYM $S*
$SEVERITY == "0"
$STATUS == "%X00038090"

SEVERITY = 0 means "WARNING"

$ WRITE SYS$OUTPUT F$MESSAGE(%X00038090)
%CLI-W-IVVERB, unrecognized command verb - check validity and spelling

Please explain your problem more detailed....


0

Response Number 2
Name: Bob Gezelter
Date: October 12, 2004 at 11:19:35 Pacific
Reply:

Shari,

Hakan has some good suggestions, allow me to suggest two more:

- Do a SPAWN/OUTPUT=filename
- SET HOST 0/LOG=filename

Both are documented in the HELP text, use the HELP command to get the specifics of each command.

I hope that the above is helpful!

- Bob


0

Response Number 3
Name: erensm
Date: October 12, 2004 at 13:14:29 Pacific
Reply:

If it is a command procedure, you can use the /OUTPUT qualifier e.g.
$ @MYCOMMANDFILE /OUTPUT=MYOUTPUT.TXT


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: to write system errors into a file

String too long to write into file www.computing.net/answers/openvms/string-too-long-to-write-into-file/453.html

strings into a file www.computing.net/answers/openvms/strings-into-a-file/403.html

How to Search a Keyword in a File www.computing.net/answers/openvms/how-to-search-a-keyword-in-a-file/441.html