HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Way to extract full message attributes
Operating System - OpenVMS
1827794
Members
2381
Online
109969
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 11:26 AM
08-14-2009 11:26 AM
I am on OpenVMS 8.3 IA64.
Is there a way to convert a .MSG file into a "normalized" form, where I can get a listing of all the messages with all of their attributes?
I have a .MSG file which I want to print out with the code, message, severity, fao, facility, prefix, etc. Some of these parameters are set for each line, but others are set for whole blocks of lines using .SEVERITY and .FACILITY directives.
Is there an easy way to convert this into a form where nothing is set by directive, but intead is made explicit on each line. I am open to using MESSAGE, UNMESSAGE, Perl, or even writing a program and calling LIB$SIGNAL on every condition... It just has to be some process where message file goes in and list of all messages with attributes comes out.
Thanks.
Is there a way to convert a .MSG file into a "normalized" form, where I can get a listing of all the messages with all of their attributes?
I have a .MSG file which I want to print out with the code, message, severity, fao, facility, prefix, etc. Some of these parameters are set for each line, but others are set for whole blocks of lines using .SEVERITY and .FACILITY directives.
Is there an easy way to convert this into a form where nothing is set by directive, but intead is made explicit on each line. I am open to using MESSAGE, UNMESSAGE, Perl, or even writing a program and calling LIB$SIGNAL on every condition... It just has to be some process where message file goes in and list of all messages with attributes comes out.
Thanks.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 01:56 PM
08-14-2009 01:56 PM
Solution
Writing your own parser? Why?
Why not build the message library and access the resulting message definitions normally; use the MESSAGE definition module as it was originally intended?
If you're looking to include messages in an application, then look to use the (undocumented) MESSAGE /SDL and the SDL tool. Details are here:
http://labs.hoffmanlabs.com/node/588
http://labs.hoffmanlabs.com/node/585
Why not build the message library and access the resulting message definitions normally; use the MESSAGE definition module as it was originally intended?
If you're looking to include messages in an application, then look to use the (undocumented) MESSAGE /SDL and the SDL tool. Details are here:
http://labs.hoffmanlabs.com/node/588
http://labs.hoffmanlabs.com/node/585
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 12:05 AM
08-17-2009 12:05 AM
Re: Way to extract full message attributes
message/list produces a listing, which includes the full message text and code. That's not exactly what you are asking for, but it may help. Search it for ".facility" and use the last four (hex) digits of the facility code to extract all messages with their code.
If you want this to have your literals defined in any programming language, you are better off with the SDL output and the SDL tool.
But you can easily construct your literals or '#define's out of the message object. For Alpha and C just use something like:
$! p1 message file (without type .msg)
$! p2 facility name
$! results in 'p1.h
$
$ message/object=tmp 'p1.MSG
$ analyze/obj/out=x.tmp tmp
$ search x.tmp symbol:,value/out=y.tmp
$ search y.tmp """''p2'"/wind=(1,0)/out=z.tmp
$ open/read in z.tmp
$ open/write out 'p1.h
$ loop:
$ read/end=done in line1
$ read in line2
$ line1= line1- "value:"- "%X'00000000"- "'"
$ line2= line2- "symbol:"- """"- """"
$ write out "#define ", f$edit(line2,"collapse"), " 0x", f$edit(line1,"collapse")
$ goto loop
$ done:
$ close in
$ close out
$ del tmp.obj;*, x.tmp;*, y.tmp;*, z.tmp;*
If you want this to have your literals defined in any programming language, you are better off with the SDL output and the SDL tool.
But you can easily construct your literals or '#define's out of the message object. For Alpha and C just use something like:
$! p1 message file (without type .msg)
$! p2 facility name
$! results in 'p1.h
$
$ message/object=tmp 'p1.MSG
$ analyze/obj/out=x.tmp tmp
$ search x.tmp symbol:,value/out=y.tmp
$ search y.tmp """''p2'"/wind=(1,0)/out=z.tmp
$ open/read in z.tmp
$ open/write out 'p1.h
$ loop:
$ read/end=done in line1
$ read in line2
$ line1= line1- "value:"- "%X'00000000"- "'"
$ line2= line2- "symbol:"- """"- """"
$ write out "#define ", f$edit(line2,"collapse"), " 0x", f$edit(line1,"collapse")
$ goto loop
$ done:
$ close in
$ close out
$ del tmp.obj;*, x.tmp;*, y.tmp;*, z.tmp;*
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP