- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- lib$find_image_symbol returning undefined status v...
Operating System - OpenVMS
1825551
Members
2738
Online
109681
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
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
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
тАО05-22-2006 04:53 AM
тАО05-22-2006 04:53 AM
If lib$find_image_symbol is called for an invalid image, the return status is 1381050 (defined as LIB$_ACTIMAGE in libdef.h.
If lib$find_image_symbol is called for a valid image, but an invalid symbol, the return status is 1409786. However, we could not this number defined as a constant anywhere in the system header files. According to the VMS documentation (http://h71000.www7.hp.com/doc/82final/5932/5932pro_018.html#fin_i / http://h71000.www7.hp.com/doc/82final/5932/5932pro_033.html#lookuk), it appears that the returned status should actually be LIB$_KEYNOTFOU (1409788). Our speculation guess is that some programmer made a mistake a while ago and this value is incorrectly hard-coded somewhere, but now it cannot be changed due to passivity reasons. Any thoughts/comments as to how we could confirm this, and how we should proceed? Should we just hard-code the undefined value within our application code? Is this deemed a 'safe' programming practice?
thanks,
Andrew Olson
Cerner Corporation
If lib$find_image_symbol is called for a valid image, but an invalid symbol, the return status is 1409786. However, we could not this number defined as a constant anywhere in the system header files. According to the VMS documentation (http://h71000.www7.hp.com/doc/82final/5932/5932pro_018.html#fin_i / http://h71000.www7.hp.com/doc/82final/5932/5932pro_033.html#lookuk), it appears that the returned status should actually be LIB$_KEYNOTFOU (1409788). Our speculation guess is that some programmer made a mistake a while ago and this value is incorrectly hard-coded somewhere, but now it cannot be changed due to passivity reasons. Any thoughts/comments as to how we could confirm this, and how we should proceed? Should we just hard-code the undefined value within our application code? Is this deemed a 'safe' programming practice?
thanks,
Andrew Olson
Cerner Corporation
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2006 06:40 AM
тАО05-22-2006 06:40 AM
Solution
It's the same error, just different severity:
$ exit 1409786
%LIB-E-KEYNOTFOU, key not found in tree
$ exit 1409788
%LIB-F-KEYNOTFOU, key not found in tree
The one you got was an error rather than a fatal error. An OpenVMS condition value is not just an arbitrary constant but rather a 32-bit structure the fields of which have specific and well documented meanings. For details, see the calling standard manual, currently at:
http://h71000.www7.hp.com/DOC/82final/5973/5973pro_022.html
$ exit 1409786
%LIB-E-KEYNOTFOU, key not found in tree
$ exit 1409788
%LIB-F-KEYNOTFOU, key not found in tree
The one you got was an error rather than a fatal error. An OpenVMS condition value is not just an arbitrary constant but rather a 32-bit structure the fields of which have specific and well documented meanings. For details, see the calling standard manual, currently at:
http://h71000.www7.hp.com/DOC/82final/5973/5973pro_022.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2006 05:49 PM
тАО05-23-2006 05:49 PM
Re: lib$find_image_symbol returning undefined status value (1409786)
>Should we just hard-code the undefined
>value within our application code? Is this
>deemed a 'safe' programming practice?
How you test condition codes depends on your objectives. For example, to test for success or fail, just look at the low bit.
Hard coding codes is rarely a good idea. As Craig said, the value is actually a structure with different components. The same condition could be returned or signalled with different severity, facility code or flags.
If you want to check for a specific condition, independent of other components of the condition code, use LIB$MATCH_COND. In your case:
stat=LIB$FIND_IMAGE_SYMBOL( etc...)
check=LIB$MATCH_COND(stat,LIB$_KEYNOTFOU)
will return 1 if the returned code matches KEYNOTFOU for any severity or facility. For example, it could be "RMS-S-KEYNOTFOU", or "SYS-F-KEYNOTFOU".
LIB$MATCH_COND accepts a list of candidate conditions as a variable argument list. It will return the index of the first matching code.
In this case the programmer of LIB$FIND_IMAGE_SYMBOL did not make a mistake, they wanted to return an "E" severity condition, rather than "F". Makes sense since FIND_IMAGE_SYMBOL signals its status.
>value within our application code? Is this
>deemed a 'safe' programming practice?
How you test condition codes depends on your objectives. For example, to test for success or fail, just look at the low bit.
Hard coding codes is rarely a good idea. As Craig said, the value is actually a structure with different components. The same condition could be returned or signalled with different severity, facility code or flags.
If you want to check for a specific condition, independent of other components of the condition code, use LIB$MATCH_COND. In your case:
stat=LIB$FIND_IMAGE_SYMBOL( etc...)
check=LIB$MATCH_COND(stat,LIB$_KEYNOTFOU)
will return 1 if the returned code matches KEYNOTFOU for any severity or facility. For example, it could be "RMS-S-KEYNOTFOU", or "SYS-F-KEYNOTFOU".
LIB$MATCH_COND accepts a list of candidate conditions as a variable argument list. It will return the index of the first matching code.
In this case the programmer of LIB$FIND_IMAGE_SYMBOL did not make a mistake, they wanted to return an "E" severity condition, rather than "F". Makes sense since FIND_IMAGE_SYMBOL signals its status.
A crucible of informative mistakes
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP