<?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: Internal PID to Extended PID conversion &amp;quot;problem&amp;quot; in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656131#M99359</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is a link which explains about the CVT_EPID_TO_IPID. You may like to refer.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.openvms.compaq.com/wizard/wiz_9234.html" target="_blank"&gt;http://www.openvms.compaq.com/wizard/wiz_9234.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ketan&lt;BR /&gt;</description>
    <pubDate>Fri, 02 Jul 2010 09:41:18 GMT</pubDate>
    <dc:creator>Shriniketan Bhagwat</dc:creator>
    <dc:date>2010-07-02T09:41:18Z</dc:date>
    <item>
      <title>Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656128#M99356</link>
      <description>I'm trying to assist a colleague who is for whatever reason obtaining details of an offending process, by finding a logical defined in its job table.&lt;BR /&gt;&lt;BR /&gt;Obviously, knowing the job table name doesn't of itself tell you what the offending process is.&lt;BR /&gt;&lt;BR /&gt;I advised him to use SDA to FORMAT /TYP=JIB the xxxxxxxx part of the LNM$JOB_xxxxxxxx table name.&lt;BR /&gt;&lt;BR /&gt;From this, you can get the JIB$L_MPID value (Master Internal PID).&lt;BR /&gt;&lt;BR /&gt;For the subsequent processing he needs to do, he needs to have the Extended PID (EPID), not the MPID.&lt;BR /&gt;&lt;BR /&gt;I'm having difficulty in converting the MPID to the EPID...&lt;BR /&gt;&lt;BR /&gt;The Internals &amp;amp; Data Structures manual says this about the EPID:&lt;BR /&gt;&lt;BR /&gt;Bit 31 is always 0, to avoid negative PIDs (reading between the lines, in some places where PIDs can be passed, a negative value has a special meaning).&lt;BR /&gt;&lt;BR /&gt;Bits 21-30 contain the Node Sequence Number and Node Index, which are derived from SCH$GW_LOCALNODE.&lt;BR /&gt;&lt;BR /&gt;Bits 0-20 are split between the Process Index and the Process Sequence Number, with the number of bits allocated to each, being dependent on the value of the MAXPROCESSCNT SYSGEN parameter (which determines SCH$GL_PIXWIDTH, which is then used in deciding the field width).&lt;BR /&gt;&lt;BR /&gt;On one cluster, if I look at my own process in SDA, I see that MPID=005407F2, and EPID=228547F2.&lt;BR /&gt;&lt;BR /&gt;SCH$GL_PIXWIDTH is %X0C&lt;BR /&gt;SCH$GW_LOCALNODE is %X114&lt;BR /&gt;&lt;BR /&gt;So, we have:&lt;BR /&gt;&lt;BR /&gt; 3         2         1         0&lt;BR /&gt;10987654321098765432109876543210&lt;BR /&gt;XBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAA&lt;BR /&gt;  100010100001010100011111110010 EPID(228547F2)&lt;BR /&gt;  000000010101000000011111110010 MPID(5407F2)&lt;BR /&gt;&lt;BR /&gt;Bit shifting the SCH$GW_LOCALNODE value so that it can be overlayed into BBBBBBBBBB:&lt;BR /&gt; &lt;BR /&gt;  100010100                      SCH$GW(114)&lt;BR /&gt;&lt;BR /&gt;If I perform a logical AND on the MPID and the bit-shifted SCH$GW_LOCALNODE value, I get:&lt;BR /&gt;&lt;BR /&gt;  100010100101000000011111110010 Calculated EPID(114407F2)&lt;BR /&gt;&lt;BR /&gt;However, the actual EPID has bits 14 and 16 set, and bit 20 clear:&lt;BR /&gt;&lt;BR /&gt; 3         2         1         0&lt;BR /&gt;10987654321098765432109876543210&lt;BR /&gt;XBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAA&lt;BR /&gt;  100010100001010100011111110010 EPID(228547F2)&lt;BR /&gt;  100010100101000000011111110010 Calculated EPID(114407F2)&lt;BR /&gt;&lt;BR /&gt;Am I missing something out here?&lt;BR /&gt;&lt;BR /&gt;I don't have my copy of the book to hand, though I was surprised to find it online as a scanned copy at Google Books.&lt;BR /&gt;&lt;BR /&gt;Is there something I have skipped, or is it not as simple as bit shifting the SCH$GW_LOCALNODE value and doing a logical AND with the MPID value?&lt;BR /&gt;&lt;BR /&gt;Even if there is a simpler way of getting the EPID from a job logical name table, I'm still perplexed by the MPID-&amp;gt;EPID conversion.&lt;BR /&gt;&lt;BR /&gt;If anyone can clear the wood so I can see the trees, I'd be much obliged!&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Fri, 02 Jul 2010 08:21:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656128#M99356</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-07-02T08:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656129#M99357</link>
      <description>Hi,&lt;BR /&gt;There is a routine&lt;BR /&gt;&lt;BR /&gt;int exe_std$cvt_ipid_to_epid ( in ipid );&lt;BR /&gt;&lt;BR /&gt;that returns the EPID given an IPID.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Jul 2010 09:11:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656129#M99357</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2010-07-02T09:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656130#M99358</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Internal process ID of the target process. The internal PID, or internal process ID, is distinct from the extended PID, or PID. The internal PID does not include any node information, and is used only in internal routines that operate on a single node within a cluster. The two types of pids are described in the PCBDEF.SDL file. Note that the bit layout of the pids is dependent upon the version of OpenVMS in use, and may change from one version of OpenVMS to the next. However, the internal PID can be derived from the extended PID using the routine EXE_STD$CVT_EPID_TO_IPID. This routine takes a single argument (the extended pid, unsigned longword by value) and returns the internal pid (unsigned longword by value) as the return value of the routine. If an error occurs, the return value is set to zero. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ketan</description>
      <pubDate>Fri, 02 Jul 2010 09:30:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656130#M99358</guid>
      <dc:creator>Shriniketan Bhagwat</dc:creator>
      <dc:date>2010-07-02T09:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656131#M99359</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is a link which explains about the CVT_EPID_TO_IPID. You may like to refer.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.openvms.compaq.com/wizard/wiz_9234.html" target="_blank"&gt;http://www.openvms.compaq.com/wizard/wiz_9234.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ketan&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Jul 2010 09:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656131#M99359</guid>
      <dc:creator>Shriniketan Bhagwat</dc:creator>
      <dc:date>2010-07-02T09:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656132#M99360</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here are the usual suspects for PID-related conversions: &lt;BR /&gt;&lt;BR /&gt;EXE$CVT_EPID_TO_IPID, &lt;BR /&gt;EXE$CVT_IPID_TO_EPID, &lt;BR /&gt;EXE$CVT_IPID_TO_KTB, &lt;BR /&gt;EXE$CVT_IPID_TO_PCB, &lt;BR /&gt;EXE_STD$CVT_EPID_TO_IPID, &lt;BR /&gt;EXE_STD$CVT_IPID_TO_EPID, &lt;BR /&gt;EXE_STD$CVT_IPID_TO_PCB &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ketan&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Jul 2010 09:41:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656132#M99360</guid>
      <dc:creator>Shriniketan Bhagwat</dc:creator>
      <dc:date>2010-07-02T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656133#M99361</link>
      <description>Kris and Shriniketan, thanks for the suggestion - I'd already seen this, however...&lt;BR /&gt;&lt;BR /&gt;It seems a bit of a chore to create an executable just to perform the conversion of MPID to EPID only, since he'd still have to manually do the ANA /SYS, READ SYSDEF.STB, FORMAT /TYP=JIB and then extract the MPID.&lt;BR /&gt;&lt;BR /&gt;I'd be inclined to put the the whole lot into an executable, so it takes whatever input he currently has (to determine the job table name of the offending process), and simply spits out the EPID.&lt;BR /&gt;&lt;BR /&gt;However, I'm busy with other things at the moment, and was keen to get him going with an automated solution in DCL however clunky it might be.</description>
      <pubDate>Fri, 02 Jul 2010 09:42:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656133#M99361</guid>
      <dc:creator>Mark Corcoran</dc:creator>
      <dc:date>2010-07-02T09:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656134#M99362</link>
      <description>I wonder if your colleague needs to take a step back and look that what they are really trying to do.</description>
      <pubDate>Fri, 02 Jul 2010 12:35:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656134#M99362</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2010-07-02T12:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656135#M99363</link>
      <description>&lt;BR /&gt;What Ian really wanted to say...&lt;BR /&gt;&lt;BR /&gt;Check out: &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://eisner.encompasserve.org/~miller/" target="_blank"&gt;http://eisner.encompasserve.org/~miller/&lt;/A&gt;&lt;BR /&gt;look for: LN$SDA&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You may also want to alert your colleague to &lt;BR /&gt;SDA&amp;gt; CLUE PROC/LOGICAL&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Jul 2010 13:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656135#M99363</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-07-02T13:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656136#M99364</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;You don't say what version of VMS is involved, but if you are already in SDA, it is quite straight forward to let it do the conversion.&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; set proc/in=ipid ! undocumented featrue one of [process index|epid|ipid]&lt;BR /&gt;SDA&amp;gt; show proc&lt;BR /&gt;&lt;BR /&gt;Although it is not documented that I am aware of, the set process/index command will accept epid or ipid in addition to process index.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; set proc/in=078F0137&lt;BR /&gt;SDA&amp;gt; sho proc&lt;BR /&gt;&lt;BR /&gt;Process index: 0137   Name: T42088412E_MON    Extended PID: 209E3D37&lt;BR /&gt;--------------------------------------------------------------------&lt;BR /&gt;Process status:          00040001  RES,PHDRES&lt;BR /&gt;        status2:         00000000  &lt;BR /&gt;&lt;BR /&gt;&lt;SKIP down="" several="" pages="" to="" verify=""&gt;&lt;BR /&gt;&lt;BR /&gt;KTB address              8436CB00    HWPCB address   FFFFFFFF.90334080&lt;BR /&gt;PKTA address             7FFEFF98    Callback vector address  00000000&lt;BR /&gt;Internal PID             078F0137    Callback error           00000000&lt;BR /&gt;Extended PID             209E3D37    Current CPU id           00000003&lt;BR /&gt;State                     LEF        Flags                    00000000&lt;BR /&gt;&lt;BR /&gt;This doesn't answer your question about why manual conversion you did did not work, you shouldn't be doing that conversion yourself anyway, as the format is allowed to change at any time.  The routines provided by other posters are there to make things less likely to break across VMS versions.&lt;BR /&gt;Of course since the method I gave is also undocumented, it is not guaranteed to work in the future either.&lt;BR /&gt;&lt;BR /&gt;Jon&lt;/SKIP&gt;</description>
      <pubDate>Fri, 02 Jul 2010 17:03:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656136#M99364</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2010-07-02T17:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal PID to Extended PID conversion "problem"</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656137#M99365</link>
      <description>If you want to see the JIB symbols (and you'll need to here), create and then MACRO this little file JIBDEF.MAR:&lt;BR /&gt;&lt;BR /&gt;.LIBRARY        /SYS$LIBRARY:LIB/&lt;BR /&gt;$JIBDEF GLOBAL &lt;BR /&gt;.end&lt;BR /&gt;&lt;BR /&gt;And then SDA&amp;gt; READ JIBDEF.OBJ to load the definitions:&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; read jibdef.obj&lt;BR /&gt;&lt;BR /&gt;for viewing other data structures (if you need those) either add DEF entries to the Macro32 file, or SDA&amp;gt; READ/EXEC to load stuff from the exec listings.&lt;BR /&gt;&lt;BR /&gt;The following gets a "scratch" process loaded up into the "viewport", just to get the JIB and some other default SDA symbols set...&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; show proc/ind=0&lt;BR /&gt;&lt;BR /&gt;(this gets a JIB symbol set for the current process, just for the purposes of this demo.  You'd enter your JIB address here.)&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; exam jib+JIB$L_MPID &lt;BR /&gt;JIB+00064:  00010047   "G..."&lt;BR /&gt;&lt;BR /&gt;Or specifying the JIB by its address (examine JIB, or translate that logical name table, etc) like this:&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; exam 827E1380+JIB$L_MPID&lt;BR /&gt;JIB+00064:  00010047   "G..."&lt;BR /&gt;&lt;BR /&gt;SDA&amp;gt; sho proc/ind=47 &lt;BR /&gt;&lt;BR /&gt;Process index: 0047   Name: ...&lt;BR /&gt;&lt;BR /&gt;(If you want, you can specify the full IPID as the parameter for the /INDEX qualifier, but the index (the lower part of the PID) works well enough and is a convenient short-cut.  INDEX is the process INDEX, and SDA is smart enough to just look at the part of the PID (any type) that is the index; it's in the same spot and the same bit-width.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Jul 2010 20:50:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/internal-pid-to-extended-pid-conversion-quot-problem-quot/m-p/4656137#M99365</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2010-07-02T20:50:52Z</dc:date>
    </item>
  </channel>
</rss>

