<?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: Translating TCPIP status codes to text via $GETMSG in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851116#M34766</link>
    <description>&amp;gt;&amp;gt; so it does translate the value at that point but the trace is less than desirable &lt;BR /&gt;&lt;BR /&gt;(unfortunately?) the Shareable Message Images do not have a (Dummy) symbol to go find.&lt;BR /&gt;&lt;BR /&gt;And LIB$FIS will signal a warning when it can not find the targetted symbol (none), after mappnig the image.&lt;BR /&gt;&lt;BR /&gt;So as par LIB$FIS documentation you will have to come up with a SIGNAL HANDLER and it can not be the simple LIB$SIGNAL_TO_RET. :-(.&lt;BR /&gt;&lt;BR /&gt;It would be kind of nice to have a real symbol to look for in message file. The value could even be useful, perhaps the message base.&lt;BR /&gt;&lt;BR /&gt;It would be kind of nice if one of those 'reserved' bits for the flag to LIB$FIS would say 'don't bother to signal, just return'&lt;BR /&gt;&lt;BR /&gt;see also:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.tmk.com/ftp/multinet-contributed-software/mm/deliver_pmdf.c" target="_blank"&gt;http://www.tmk.com/ftp/multinet-contributed-software/mm/deliver_pmdf.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/DOC/82final/5932/5932pro_018.html" target="_blank"&gt;http://h71000.www7.hp.com/DOC/82final/5932/5932pro_018.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;option type = explicit, constant type = integer, size = integer long, &amp;amp;&lt;BR /&gt;   handle=ERROR&lt;BR /&gt;&lt;BR /&gt;when ERROR use my_handler&lt;BR /&gt;&lt;BR /&gt;declare word msglen&lt;BR /&gt;declare integer this&lt;BR /&gt;declare string tmpstr&lt;BR /&gt;&lt;BR /&gt;tmpstr = space$(255)&lt;BR /&gt;&lt;BR /&gt;call sys$getmsg(392469178 by value,msglen,tmpstr,15 by value,)&lt;BR /&gt;print seg$(tmpStr,1,msglen)&lt;BR /&gt;sleep 3&lt;BR /&gt;&lt;BR /&gt;call lib$find_image_symbol('TCPIP$MSG','TCPIP$_ACPQIO',THIS,'SYS$MESSAGE:.EXE')&lt;BR /&gt;&lt;BR /&gt;call sys$getmsg(392469178 by value,msglen,tmpstr,15 by value,)&lt;BR /&gt;print seg$(tmpStr,1,msglen)&lt;BR /&gt;&lt;BR /&gt;end when&lt;BR /&gt;&lt;BR /&gt;handler my_handler&lt;BR /&gt;print "Hello!"&lt;BR /&gt;continue&lt;BR /&gt;end handler&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------&lt;BR /&gt;&lt;BR /&gt;$ run tmp&lt;BR /&gt;%NONAME-E-NOMSG, Message number 17649ABA&lt;BR /&gt;Hello!&lt;BR /&gt;%TCPIP-E-FTP_NETERR, I/O error on network device&lt;BR /&gt;$ lo&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;&lt;BR /&gt;Hein &lt;BR /&gt;HvdH Performance Consulting</description>
    <pubDate>Wed, 06 Sep 2006 22:33:39 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2006-09-06T22:33:39Z</dc:date>
    <item>
      <title>Translating TCPIP status codes to text via $GETMSG</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851113#M34763</link>
      <description>&lt;!--!*#--&gt;This is on OpenVMS V7.3-2. The code making the relevant calls is written in Alpha BASIC V1.5-000.&lt;BR /&gt;&lt;BR /&gt;I have a process running that among a number of other things keeps an eye on jobs going through a queue. Part of keeping an eye is to record the entry in a log file then remove the job (all jobs are retained).&lt;BR /&gt;&lt;BR /&gt;$GETMSG is used to translate the status values coming back from $GETQUI.&lt;BR /&gt;&lt;BR /&gt;Question: What do I have to include and/or link against in order to be able to translate TCPIP related status values along the lines of the following is the function that is making the $GETQUI calls?&lt;BR /&gt;&lt;BR /&gt;        %include "$jbcmsgdef" %from %library "sys$library:basic$starlet"&lt;BR /&gt;        %include "$lnmdef"    %from %library "sys$library:basic$starlet"&lt;BR /&gt;        %include "$psldef"    %from %library "sys$library:basic$starlet"&lt;BR /&gt;        %include "$quidef"    %from %library "sys$library:basic$starlet"&lt;BR /&gt;        %include "$sjcdef"    %from %library "sys$library:basic$starlet"&lt;BR /&gt;        %include "$ssdef"     %from %library "sys$library:basic$starlet"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As is I get an status that can't be translated into text for TCPIP related problems:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Entry    JobName          Username          Status&lt;BR /&gt;-----    -------          --------          ------&lt;BR /&gt; 2373    &amp;gt; xxxxxx xxx     xxxxxxxxxx        Retained on error&lt;BR /&gt;         %NONAME-E-NOMSG, Message number 17649ABA&lt;BR /&gt;         Submitted 22-AUG-2006 00:03:54.38 /PRIORITY=100&lt;BR /&gt;         /LOG=$1$DGA1500:[xxx.yyyyyyyyyy.zzz]xxxxxx_xxx_xxx.LOG;&lt;BR /&gt;         File: _$1$DGA1500:[xxx.xxxxxxxxxx.xxxxxxxx]xxx_xxxxxx_xxx_xxx.COM;yy&lt;BR /&gt;         Completed 22-AUG-2006 04:06:23.54 on queue ABFQUEUE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I would rather have the %TCPIP-E-FTP_NETERR, I/O error on network device in the log file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TIA</description>
      <pubDate>Sun, 27 Aug 2006 13:38:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851113#M34763</guid>
      <dc:creator>Joe Huber</dc:creator>
      <dc:date>2006-08-27T13:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Translating TCPIP status codes to text via $GETMSG</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851114#M34764</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;  Note there's a difference between the symbols for defining the symbolic names for condition codes (for example, $SSDEF gives you definitions for SS$_NORMAL etc...) and the translation from a condition code into a message string. &lt;BR /&gt;&lt;BR /&gt;  The latter can be found in the message files in SYS$MESSAGE. TCPIP messages are in TCPIP$MSG.&lt;BR /&gt;&lt;BR /&gt;  As noted in the $GETMSG documentation, message files are searched as:&lt;BR /&gt;&lt;BR /&gt;------------------------&lt;BR /&gt;1) All message sections linked into the currently executing image are searched for the associated information. &lt;BR /&gt;&lt;BR /&gt;2) If the information is not found, the process-permanent message file is searched. (You can specify the process-permanent message file by using the SET MESSAGE command.) &lt;BR /&gt;&lt;BR /&gt;3) If the information is not found, the systemwide message file is searched. &lt;BR /&gt;&lt;BR /&gt;4) If the information is not found, the SS$_MSGNOTFND condition value is returned in R0 and a message in the following form is returned to the caller's buffer:&lt;BR /&gt;%facility-severity-NONAME, message=xxxxxxxx[hex], (facility=n, message=n[dec]) &lt;BR /&gt;--------------------&lt;BR /&gt;&lt;BR /&gt;By default, TCPIP$MSG is not found by any of these methods.&lt;BR /&gt;&lt;BR /&gt;You can override the defaults with: &lt;BR /&gt;&lt;BR /&gt;$ SET MESSAGE SYS$MESSAGE:TCPIP$MSG&lt;BR /&gt;&lt;BR /&gt;prior to running your program. The result is $GETMSG will find that particular message. You can explicitly link TCPIP$MSG into your image with an options file:&lt;BR /&gt;&lt;BR /&gt;TCPIPMSG.OPT&lt;BR /&gt;SYS$MESSAGE:TCPIP$MSG/SHARE&lt;BR /&gt;&lt;BR /&gt;However, at run time you will need a logical name:&lt;BR /&gt;&lt;BR /&gt;$ DEFINE TCPIP$MSG SYS$MESSAGE:TCPIP$MSG  &lt;BR /&gt;&lt;BR /&gt;You can avoid both linking and defining the logical name if you activate TCPIP$MSG at run time with LIB$FIND_IMAGE_SYMBOL.&lt;BR /&gt;&lt;BR /&gt;Note this only solves the issue for TCPIP messages. Other facilities will need to be handled independently.</description>
      <pubDate>Sun, 27 Aug 2006 19:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851114#M34764</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-08-27T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Translating TCPIP status codes to text via $GETMSG</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851115#M34765</link>
      <description>&lt;!--!*#--&gt;I've been absorbed with another part of the code...&lt;BR /&gt;&lt;BR /&gt;This runs as a detached process which makes the dynamic linking (as I guess it would be called) appealing. What do I specific for the symbol (argument 2)??&lt;BR /&gt;&lt;BR /&gt;I have been pulling my hair out getting %LIB-E-KEYNOTFOU, key not found in tree when I make the call. I happened to modify a little stub program to call $GETMSG as follows on a whim after much anguish:&lt;BR /&gt;&lt;BR /&gt;option type = explicit, constant type = integer, size = integer long&lt;BR /&gt;&lt;BR /&gt;declare word msglen&lt;BR /&gt;declare integer this&lt;BR /&gt;declare string tmpstr&lt;BR /&gt;&lt;BR /&gt;tmpstr = space$(255)&lt;BR /&gt;&lt;BR /&gt;call sys$getmsg(392469178 by value,msglen,tmpstr,15 by value,)&lt;BR /&gt;print seg$(tmpStr,1,msglen)&lt;BR /&gt;sleep 3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;call lib$find_image_symbol('TCPIP$MSG','',THIS,'SYS$MESSAGE:.EXE')&lt;BR /&gt;call sys$getmsg(392469178 by value,msglen,tmpstr,15 by value,)&lt;BR /&gt;print seg$(tmpStr,1,msglen)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ r x&lt;BR /&gt;%NONAME-E-NOMSG, Message number 17649ABA&lt;BR /&gt;%LIB-E-KEYNOTFOU, key not found in tree&lt;BR /&gt;%TRACE-E-TRACEBACK, symbolic stack dump follows&lt;BR /&gt;  image    module    routine             line      rel PC           abs PC&lt;BR /&gt; LIBRTL                                     0 0000000000070894 FFFFFFFF8089A894&lt;BR /&gt; LIBRTL                                                      ?                ?&lt;BR /&gt; DEC$BASRTL                                 0 000000000000EE54 000000007C018E54&lt;BR /&gt;----- above condition handler called with exception 001582FA:&lt;BR /&gt;%LIB-E-KEYNOTFOU, key not found in tree&lt;BR /&gt;----- end of exception message&lt;BR /&gt;                                            0 FFFFFFFF800A209C FFFFFFFF800A209C&lt;BR /&gt; LIBRTL                                     0 0000000000087C7C FFFFFFFF808B1C7C&lt;BR /&gt; LIBRTL                                                      ?                ?&lt;BR /&gt; X  X$MAIN  X$MAIN                         14 00000000000001DC 00000000000201DC&lt;BR /&gt;                                            0 FFFFFFFF8026FED4 FFFFFFFF8026FED4&lt;BR /&gt;%TCPIP-E-FTP_NETERR, I/O error on network device&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so it does translate the value at that point but the trace is less than desirable (or am I doing something wrong and it's translating the value in the 2nd call "by dumb luck")?</description>
      <pubDate>Wed, 06 Sep 2006 16:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851115#M34765</guid>
      <dc:creator>Joe Huber</dc:creator>
      <dc:date>2006-09-06T16:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Translating TCPIP status codes to text via $GETMSG</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851116#M34766</link>
      <description>&amp;gt;&amp;gt; so it does translate the value at that point but the trace is less than desirable &lt;BR /&gt;&lt;BR /&gt;(unfortunately?) the Shareable Message Images do not have a (Dummy) symbol to go find.&lt;BR /&gt;&lt;BR /&gt;And LIB$FIS will signal a warning when it can not find the targetted symbol (none), after mappnig the image.&lt;BR /&gt;&lt;BR /&gt;So as par LIB$FIS documentation you will have to come up with a SIGNAL HANDLER and it can not be the simple LIB$SIGNAL_TO_RET. :-(.&lt;BR /&gt;&lt;BR /&gt;It would be kind of nice to have a real symbol to look for in message file. The value could even be useful, perhaps the message base.&lt;BR /&gt;&lt;BR /&gt;It would be kind of nice if one of those 'reserved' bits for the flag to LIB$FIS would say 'don't bother to signal, just return'&lt;BR /&gt;&lt;BR /&gt;see also:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.tmk.com/ftp/multinet-contributed-software/mm/deliver_pmdf.c" target="_blank"&gt;http://www.tmk.com/ftp/multinet-contributed-software/mm/deliver_pmdf.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/DOC/82final/5932/5932pro_018.html" target="_blank"&gt;http://h71000.www7.hp.com/DOC/82final/5932/5932pro_018.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;option type = explicit, constant type = integer, size = integer long, &amp;amp;&lt;BR /&gt;   handle=ERROR&lt;BR /&gt;&lt;BR /&gt;when ERROR use my_handler&lt;BR /&gt;&lt;BR /&gt;declare word msglen&lt;BR /&gt;declare integer this&lt;BR /&gt;declare string tmpstr&lt;BR /&gt;&lt;BR /&gt;tmpstr = space$(255)&lt;BR /&gt;&lt;BR /&gt;call sys$getmsg(392469178 by value,msglen,tmpstr,15 by value,)&lt;BR /&gt;print seg$(tmpStr,1,msglen)&lt;BR /&gt;sleep 3&lt;BR /&gt;&lt;BR /&gt;call lib$find_image_symbol('TCPIP$MSG','TCPIP$_ACPQIO',THIS,'SYS$MESSAGE:.EXE')&lt;BR /&gt;&lt;BR /&gt;call sys$getmsg(392469178 by value,msglen,tmpstr,15 by value,)&lt;BR /&gt;print seg$(tmpStr,1,msglen)&lt;BR /&gt;&lt;BR /&gt;end when&lt;BR /&gt;&lt;BR /&gt;handler my_handler&lt;BR /&gt;print "Hello!"&lt;BR /&gt;continue&lt;BR /&gt;end handler&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------&lt;BR /&gt;&lt;BR /&gt;$ run tmp&lt;BR /&gt;%NONAME-E-NOMSG, Message number 17649ABA&lt;BR /&gt;Hello!&lt;BR /&gt;%TCPIP-E-FTP_NETERR, I/O error on network device&lt;BR /&gt;$ lo&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;&lt;BR /&gt;Hein &lt;BR /&gt;HvdH Performance Consulting</description>
      <pubDate>Wed, 06 Sep 2006 22:33:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851116#M34766</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-06T22:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Translating TCPIP status codes to text via $GETMSG</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851117#M34767</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;  LIB$FIND_IMAGE_SYMBOL has a nasty habit of signalling all conditions. Apologies, I just assumed you'd know how to deal with that.&lt;BR /&gt;  &lt;BR /&gt;  Here's a little MACRO32 routine that accepts the name of a message file by descriptor and maps it. It uses LIB$SIG_TO_RET to catch the signalled error an convert it into a return status. You can either ignore the return status and assume your file name was correct, or test it, but accept KEYNOTFOU as success.&lt;BR /&gt;&lt;BR /&gt; .title mapmsgfile&lt;BR /&gt; .psect $data,rd,nowrt,noexe&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; MOVAL -(SP),R0&lt;BR /&gt; PUSHAB msgdir&lt;BR /&gt; PUSHL  R0&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;</description>
      <pubDate>Sun, 10 Sep 2006 18:24:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851117#M34767</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-09-10T18:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Translating TCPIP status codes to text via $GETMSG</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851118#M34768</link>
      <description>MACRO32... (wow)... it's pushing 8 years since the last time I looked at any MACRO.&lt;BR /&gt;&lt;BR /&gt;I am reluctant to admit it but I should have known how to catch the signal (as well as $FIND_IMAGE_SYMBOL solution). The last 6+ years I've been in a "non-technical" environment and seems as if after a while without use you start forgetting things (spend a moment commiserating).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In any event- thanks for the follow-up.&lt;BR /&gt;Joe</description>
      <pubDate>Mon, 11 Sep 2006 08:53:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/translating-tcpip-status-codes-to-text-via-getmsg/m-p/3851118#M34768</guid>
      <dc:creator>Joe Huber</dc:creator>
      <dc:date>2006-09-11T08:53:26Z</dc:date>
    </item>
  </channel>
</rss>

