<?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 LINKing my program with VMS indirect message file in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/linking-my-program-with-vms-indirect-message-file/m-p/3612366#M7601</link>
    <description>This takes a while to explain, so bear with me.&lt;BR /&gt;&lt;BR /&gt;I wrote some programs and callable routines that can be used instead of VMS supplied utilities for various reasons.  Except for my designed differences, I try to make them function as identically as possible to the VMS utility, including error handling.&lt;BR /&gt;&lt;BR /&gt;This means that I need to signal/return VMS facility-specific status values.  Usually a status value I need is defined in a VMS supplied include file.  Sometimes I have to hard-code the value in my code (no big deal).&lt;BR /&gt;&lt;BR /&gt;When the VMS utility signals or exits with errors the message text associated with the status value is displayed.  If this message text is defined in the facility-specific SYS$MESSAGE: file you can not use F$MESSAGE to redisplay the text unless you first use SET MESSAGE to add it to the list of message files your process knows about.&lt;BR /&gt;&lt;BR /&gt;I would like my programs to work the same way for these facility-specific message values.  But how do I get my program to display the actual message text instead of "%fac-e-NOMSG," without having to do a SET MESSAGE command before the program is run?&lt;BR /&gt;&lt;BR /&gt;I would prefer to not have to duplicate all the VMS text messages in a private .MSG file and compile it with SET MESSAGE and link in&lt;BR /&gt;the resulting .OBJ file.  So what is the best way to tell the LINKer about the existing VMS SYS$MESSAGE:.EXE file?&lt;BR /&gt;&lt;BR /&gt;If I just add "SYS$MESSAGE:xxxMSG.EXE /SHARE" to the LINKer /OPTION file then when I run my program I get a "%DCL-W-ACTIMAGE" error unless I first DEFINE xxxMSG as a logical name pointing to the SYS$MESSAGE file, or copy it to SYS$SHARE:.&lt;BR /&gt;&lt;BR /&gt;Usually I can find a VMS .EXE in SYS$SHARE: that was LINKed with the indiret message file I need (for example SYS$SHARE:UTIL$SHARE.EXE csn be used when SYS$MESSAGE:CLIUTLMSG.EXE is needed), but since I don't otherwise need UTIL$SHARE.EXE it seems stupid to LINK it in and have to suffer version dependencies with it.&lt;BR /&gt;&lt;BR /&gt;Here is an an example of what I am talking about:&lt;BR /&gt;&lt;BR /&gt;$ SUBMIT JUNK.COM /LOG=[NOEXIST]JUNK.LOG&lt;BR /&gt;%SUBMIT-F-INVLOGFIL, invalid log file specification&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;&lt;BR /&gt;$ MYSUBMIT JUNK.COM /LOG=[NOEXIST]JUNK.LOG&lt;BR /&gt;%SUBMIT-F-NOMSG, Message number 00C18324&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;$ SET MESSAGE SYS$MESSAGE:CLIUTLMSG.EXE&lt;BR /&gt;$ MYSUBMIT JUNK.COM /LOG=[NOEXIST]JUNK.LOG&lt;BR /&gt;%SUBMIT-F-INVLOGFIL, invalid log file specification&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;&lt;BR /&gt;I want MYSUBMIT to output %SUBMIT-F-INVLOGFIL, just like SUBMIT does, without doing SET MESSAGE first.&lt;BR /&gt;&lt;BR /&gt;I see from ANALYZE /IMAGE UTIL$SHARE.EXE that CLIUTLMSG.EXE is listed not in the "Shareable Image List" section, but in a "image section descriptor" section as a "indirect message section filename".  Is it possible to LINK CLIUTLMSG with my program the same way (without using a shareable image)?</description>
    <pubDate>Thu, 25 Aug 2005 18:01:54 GMT</pubDate>
    <dc:creator>Jess Goodman</dc:creator>
    <dc:date>2005-08-25T18:01:54Z</dc:date>
    <item>
      <title>LINKing my program with VMS indirect message file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/linking-my-program-with-vms-indirect-message-file/m-p/3612366#M7601</link>
      <description>This takes a while to explain, so bear with me.&lt;BR /&gt;&lt;BR /&gt;I wrote some programs and callable routines that can be used instead of VMS supplied utilities for various reasons.  Except for my designed differences, I try to make them function as identically as possible to the VMS utility, including error handling.&lt;BR /&gt;&lt;BR /&gt;This means that I need to signal/return VMS facility-specific status values.  Usually a status value I need is defined in a VMS supplied include file.  Sometimes I have to hard-code the value in my code (no big deal).&lt;BR /&gt;&lt;BR /&gt;When the VMS utility signals or exits with errors the message text associated with the status value is displayed.  If this message text is defined in the facility-specific SYS$MESSAGE: file you can not use F$MESSAGE to redisplay the text unless you first use SET MESSAGE to add it to the list of message files your process knows about.&lt;BR /&gt;&lt;BR /&gt;I would like my programs to work the same way for these facility-specific message values.  But how do I get my program to display the actual message text instead of "%fac-e-NOMSG," without having to do a SET MESSAGE command before the program is run?&lt;BR /&gt;&lt;BR /&gt;I would prefer to not have to duplicate all the VMS text messages in a private .MSG file and compile it with SET MESSAGE and link in&lt;BR /&gt;the resulting .OBJ file.  So what is the best way to tell the LINKer about the existing VMS SYS$MESSAGE:.EXE file?&lt;BR /&gt;&lt;BR /&gt;If I just add "SYS$MESSAGE:xxxMSG.EXE /SHARE" to the LINKer /OPTION file then when I run my program I get a "%DCL-W-ACTIMAGE" error unless I first DEFINE xxxMSG as a logical name pointing to the SYS$MESSAGE file, or copy it to SYS$SHARE:.&lt;BR /&gt;&lt;BR /&gt;Usually I can find a VMS .EXE in SYS$SHARE: that was LINKed with the indiret message file I need (for example SYS$SHARE:UTIL$SHARE.EXE csn be used when SYS$MESSAGE:CLIUTLMSG.EXE is needed), but since I don't otherwise need UTIL$SHARE.EXE it seems stupid to LINK it in and have to suffer version dependencies with it.&lt;BR /&gt;&lt;BR /&gt;Here is an an example of what I am talking about:&lt;BR /&gt;&lt;BR /&gt;$ SUBMIT JUNK.COM /LOG=[NOEXIST]JUNK.LOG&lt;BR /&gt;%SUBMIT-F-INVLOGFIL, invalid log file specification&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;&lt;BR /&gt;$ MYSUBMIT JUNK.COM /LOG=[NOEXIST]JUNK.LOG&lt;BR /&gt;%SUBMIT-F-NOMSG, Message number 00C18324&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;$ SET MESSAGE SYS$MESSAGE:CLIUTLMSG.EXE&lt;BR /&gt;$ MYSUBMIT JUNK.COM /LOG=[NOEXIST]JUNK.LOG&lt;BR /&gt;%SUBMIT-F-INVLOGFIL, invalid log file specification&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;&lt;BR /&gt;I want MYSUBMIT to output %SUBMIT-F-INVLOGFIL, just like SUBMIT does, without doing SET MESSAGE first.&lt;BR /&gt;&lt;BR /&gt;I see from ANALYZE /IMAGE UTIL$SHARE.EXE that CLIUTLMSG.EXE is listed not in the "Shareable Image List" section, but in a "image section descriptor" section as a "indirect message section filename".  Is it possible to LINK CLIUTLMSG with my program the same way (without using a shareable image)?</description>
      <pubDate>Thu, 25 Aug 2005 18:01:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/linking-my-program-with-vms-indirect-message-file/m-p/3612366#M7601</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2005-08-25T18:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: LINKing my program with VMS indirect message file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/linking-my-program-with-vms-indirect-message-file/m-p/3612367#M7602</link>
      <description>Jess, &lt;BR /&gt;&lt;BR /&gt;&amp;gt;   Is it possible to LINK CLIUTLMSG with my program the same way (without using a shareable image)?&lt;BR /&gt;&lt;BR /&gt;  Sorry, Not with the files distributed with OpenVMS.&lt;BR /&gt;&lt;BR /&gt;  See the OpenVMS Command Definition, Librarian and Message Utilities Manual for details on how indirect message files work. Their main purpose is to allow things like multi language support.&lt;BR /&gt;&lt;BR /&gt;  There are some indirect message files on your system, for example, LIB$MSGDEF is in STARLET.OLB, but the CLI messages aren't provided.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;"%DCL-W-ACTIMAGE" error unless I first DEFINE xxxMSG as a logical name pointing to the SYS$MESSAGE file, or copy it to SYS$SHARE:.&lt;BR /&gt;&lt;BR /&gt;  You could get around this by adding SYS$MESSAGE: to the /SYSTEM/EXEC logical name definition of SYS$SHARE:&lt;BR /&gt;&lt;BR /&gt;$ DEFINE/SYSTEM/EXEC SYS$SHARE SYS$SYSROOT:[SYSLIB], SYS$MESSAGE:&lt;BR /&gt;&lt;BR /&gt;  Unsupported, of course, but very easy to back out of if you need to prove it's not the cause of something you want to elevate.&lt;BR /&gt;&lt;BR /&gt;  Yet another option is to map the message file at run time. An example call:&lt;BR /&gt;&lt;BR /&gt;LIB$FIND_IMAGE_SYMBOL('CLIUTLMSG','NONE',intvar,'SYS$MESSAGE:.EXE')&lt;BR /&gt;&lt;BR /&gt;This is effectively a "SET MESSAGE" command inside your program.&lt;BR /&gt;&lt;BR /&gt;Note however that since there are no global symbols, and LIB$F_I_S signals messages by default, this will signal a warning because "NONE" is not a valid symbol. You'll have to handle that condition :-(&lt;BR /&gt;&lt;BR /&gt;Simplest is to establish LIB$SIG_TO_RET as a condition handler. For example, here's a little MACRO routine MapMsg which you can call once for each message file you want mapped. Just pass the name by descriptor. In your case 'CLIUTLMSG'.&lt;BR /&gt;&lt;BR /&gt; .title mapmsgfile&lt;BR /&gt; .psect $data,rd,wrt,noexe&lt;BR /&gt;int:   .LONG&lt;BR /&gt;nosym: .ASCID /NONE/&lt;BR /&gt;msgdir:.ASCID /SYS$MESSAGE:.EXE/&lt;BR /&gt;&lt;BR /&gt; .psect $code,rd,nowrt,exe&lt;BR /&gt; .entry MapMsg,^m&amp;lt;&amp;gt;&lt;BR /&gt; MOVAL G^LIB$SIG_TO_RET,(FP)&lt;BR /&gt; PUSHAB msgdir&lt;BR /&gt; PUSHAB int&lt;BR /&gt; PUSHAB nosym&lt;BR /&gt; PUSHAB @4(AP)&lt;BR /&gt; CALLS #4,G^LIB$FIND_IMAGE_SYMBOL&lt;BR /&gt; RET&lt;BR /&gt; .END&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Aug 2005 00:59:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/linking-my-program-with-vms-indirect-message-file/m-p/3612367#M7602</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2005-08-26T00:59:42Z</dc:date>
    </item>
  </channel>
</rss>

