<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VMS Message files (.MSG) and Shareable images in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409158#M42178</link>
    <description>IIRC, I circumvented this problem this way:&lt;BR /&gt;&lt;BR /&gt;* Compile the message file, creating a listing file&lt;BR /&gt;* process the listing to create a file to be included (or, in case of pascal, inherited) in any other source&lt;BR /&gt;&lt;BR /&gt;but I'll have to dig the archives to find more information.</description>
    <pubDate>Wed, 06 May 2009 05:33:10 GMT</pubDate>
    <dc:creator>Willem Grooters</dc:creator>
    <dc:date>2009-05-06T05:33:10Z</dc:date>
    <item>
      <title>VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409153#M42173</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am writing an application on OpenVMS V8.3 (Alpha and IA64).  The application has an API which is supplied as a shareable image (APISHR.EXE).  There is also a server program (SERVER.EXE) and a client program (CLIENT.EXE).  Both client and server are linked against APISHR.&lt;BR /&gt;&lt;BR /&gt;My application source code includes a VMS message definition (.MSG) file which is compiled using the MESSAGE Utility and the resulting object file is inserted into an object library.  I also have definition files in C and Pascal which define compile-time constants equal to the values of the various messages.  For example, in Pascal:&lt;BR /&gt;&lt;BR /&gt;  CONST APPL__SUCCESS = 143753225;&lt;BR /&gt;&lt;BR /&gt;So far so good, all modules compile and link without errors.&lt;BR /&gt;&lt;BR /&gt;The problem is that the object file produced from the message library isn't being used anywhere, and doesn't get included into any of the three images.  The message status values are all defined as compile-time constants so the compilers don't generate any external references and the linker doesn't need to resolve them.  This causes a problem when the code goes to report an error using any of the standard routines such as LIB$SIGNAL, SYS$GETMSG or SYS$PUTMSG.  It also means the Debugger can't do "EXAM/COND ...", e.g.&lt;BR /&gt;&lt;BR /&gt;DBG&amp;gt; exam/cond scan_result&lt;BR /&gt;CLIENT\CLIENT\CMD___SCAN\SCAN_RESULT:   %NONAME-W-NOMSG, Message number 08919F48&lt;BR /&gt;DBG&amp;gt;&lt;BR /&gt;&lt;BR /&gt;So I'm wondering how to expose the information contained in the compiled message file.  I would like to have this made available as part of the APISHR image.  Is it as simple as including the message values in the linker options file for linking APISHR, e.g.&lt;BR /&gt;&lt;BR /&gt;SYMBOL_VECTOR=( -&lt;BR /&gt;APPL_ROUTINE1=PROCEDURE, -&lt;BR /&gt;APPL_ROUTINE2=PROCEDURE, -&lt;BR /&gt;APPL__SUCCESS=DATA, -&lt;BR /&gt;APPL__FAILURE=DATA)&lt;BR /&gt;&lt;BR /&gt;where 'APPL_ROUTINE1' and 'APPL_ROUTINE2' are two public routines for the API, and 'APPL__SUCCESS' and 'APPL__FAILURE' are two error messages.&lt;BR /&gt;&lt;BR /&gt;Or do I need to do it some other way?&lt;BR /&gt;(I'm wondering if I need to use message pointer files, and if so, how would a program which uses the API link against them.)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jeremy Begg&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Apr 2009 02:42:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409153#M42173</guid>
      <dc:creator>Jeremy Begg</dc:creator>
      <dc:date>2009-04-28T02:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409154#M42174</link>
      <description>Hi Jeremy,&lt;BR /&gt;&lt;BR /&gt;  Your condition codes can be declared as data entries in the symbol vector. If you want the symbols to be visible, you'll have to declare them regardless of directly linking against your message object, or using pointer files.&lt;BR /&gt;&lt;BR /&gt;  When you tie the messages into a shareable or executable image, there is no simple way to translate a code into a message. If you use a message image and pointer, you can use SET MESSAGE and F$MESSAGE to perform the translation. &lt;BR /&gt;&lt;BR /&gt;  The way OpenVMS utilities usually do it is "self contained" utilities, like compilers link their messages directly. APIs, like SORTSHR, use pointer files, and export the symbols. SORTSHR is a good example (use FAKE_RTL to generate a sample symbol vector)&lt;BR /&gt;&lt;BR /&gt;Using message pointers isn't something you need to set in concrete, as it's transparent to any images that link against your API. On the other hand, you might run into problems if you combine exported global symbols with included compile time constants. You may want to consider changing the include files to contain external references, rather than constant values.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Apr 2009 03:31:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409154#M42174</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-04-28T03:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409155#M42175</link>
      <description>Thanks John, you've confirmed my suspicions.&lt;BR /&gt;&lt;BR /&gt;The definition files used by my C and Pascal code are generated by SDL, i.e.&lt;BR /&gt;&lt;BR /&gt;   $ message/sdl api.msg&lt;BR /&gt;   $ sdl/language=pascal=apimsg.pas api.sdl&lt;BR /&gt;&lt;BR /&gt;so changing them to generate external references instead of constants isn't so easy (unless there's a MESSAGE/SDL option I don't know about).&lt;BR /&gt;&lt;BR /&gt;Jeremy</description>
      <pubDate>Tue, 28 Apr 2009 04:00:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409155#M42175</guid>
      <dc:creator>Jeremy Begg</dc:creator>
      <dc:date>2009-04-28T04:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409156#M42176</link>
      <description>After a little testing I've decided to structure things so that there is a message pointer object file which gets linked into the shareable image, and the message file itself is linked as a second shareable image.&lt;BR /&gt;&lt;BR /&gt;I found that there was no need to make universal symbols for my message values, which is somewhat of a relief as otherwise the SYMBOL_VECTOR statement in my linker options file would become very difficult to manage.</description>
      <pubDate>Tue, 28 Apr 2009 05:28:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409156#M42176</guid>
      <dc:creator>Jeremy Begg</dc:creator>
      <dc:date>2009-04-28T05:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409157#M42177</link>
      <description>Hi Jeremy,&lt;BR /&gt;&lt;BR /&gt;FWIW, we ship an object library (t3$object) that can be linked against by the user code.&lt;BR /&gt;&lt;BR /&gt;Directory of ELF OBJECT library SYS$COMMON:[SYSLIB]T3$OBJECT.OLB;2 on 29-APR-2009 15:43:14&lt;BR /&gt;Creation date:   5-FEB-2009 20:01:11      Creator:  Librarian I01-42&lt;BR /&gt;Revision date:   6-FEB-2009 02:29:06      Library format:   6.0&lt;BR /&gt;Number of modules:      2                 Max. key length:  1024&lt;BR /&gt;Other entries:         62                 Preallocated index blocks:    213&lt;BR /&gt;Recoverable deleted blocks:        0      Total index blocks used:        8&lt;BR /&gt;Max. Number history records:      20      Library history records:        2&lt;BR /&gt;&lt;BR /&gt;T3$MSG&lt;BR /&gt;T3$SYMBOLS&lt;BR /&gt;&lt;BR /&gt;For an example of a build procedure that links against it, see: -&lt;BR /&gt;&lt;A href="http://manson.vistech.net/t3$examples/build_uars.com" target="_blank"&gt;http://manson.vistech.net/t3$examples/build_uars.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;(or BUILD_FLEX_DEMO.COM in the same area, for one that also links in Rdb)&lt;BR /&gt;&lt;BR /&gt;If after reading &lt;A href="http://manson.vistech.net/t3$examples/tier3_031.pdf" target="_blank"&gt;http://manson.vistech.net/t3$examples/tier3_031.pdf&lt;/A&gt; you're thinking "Gee life would be much easier if this was bundled with VMS!" then be aware that I spoke to several people in VMS about it coming up to 10 years ago. Please be advised that your/your-customer's requirement simply do not exist and BridgeWorks, WSIT, Forte, DCE/RPC, ONC/RPC, or COM is really what you're looking for :-( &lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS. If you'd rather not re-invent the wheel then please send me an e-mail.</description>
      <pubDate>Wed, 29 Apr 2009 05:56:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409157#M42177</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2009-04-29T05:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409158#M42178</link>
      <description>IIRC, I circumvented this problem this way:&lt;BR /&gt;&lt;BR /&gt;* Compile the message file, creating a listing file&lt;BR /&gt;* process the listing to create a file to be included (or, in case of pascal, inherited) in any other source&lt;BR /&gt;&lt;BR /&gt;but I'll have to dig the archives to find more information.</description>
      <pubDate>Wed, 06 May 2009 05:33:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409158#M42178</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-05-06T05:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: VMS Message files (.MSG) and Shareable images</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409159#M42179</link>
      <description>Hi Willem,&lt;BR /&gt;&lt;BR /&gt;The problem is not the message symbol values, it's the actual error message text.  I suppose your listing could provide the text into each module which requires it, but  (without having seen what your method is!) it seems a little clumsy.&lt;BR /&gt;&lt;BR /&gt;Anyway I'm happy with the solution I arrived at.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jeremy Begg</description>
      <pubDate>Wed, 06 May 2009 06:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-message-files-msg-and-shareable-images/m-p/4409159#M42179</guid>
      <dc:creator>Jeremy Begg</dc:creator>
      <dc:date>2009-05-06T06:36:04Z</dc:date>
    </item>
  </channel>
</rss>

