<?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: VAX PASCAL in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678378#M50757</link>
    <description>LIB$SPAWN ( Command_string := '$ @test.com' , flags := CLI$M_NOWAIT )&lt;BR /&gt;&lt;BR /&gt;Wim</description>
    <pubDate>Thu, 24 Nov 2005 07:35:21 GMT</pubDate>
    <dc:creator>Wim Van den Wyngaert</dc:creator>
    <dc:date>2005-11-24T07:35:21Z</dc:date>
    <item>
      <title>VAX PASCAL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678377#M50756</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Can some one give me an idea on how to insert a simple DCL script within  a VAX pascal porgram. I want to execute a script A.COM when the program actually starts up.</description>
      <pubDate>Thu, 24 Nov 2005 07:04:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678377#M50756</guid>
      <dc:creator>Sunil_uk</dc:creator>
      <dc:date>2005-11-24T07:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: VAX PASCAL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678378#M50757</link>
      <description>LIB$SPAWN ( Command_string := '$ @test.com' , flags := CLI$M_NOWAIT )&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Thu, 24 Nov 2005 07:35:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678378#M50757</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2005-11-24T07:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: VAX PASCAL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678379#M50758</link>
      <description>Sunil,&lt;BR /&gt;&lt;BR /&gt;  You're sure you want to execute the script from inside the program? It may be better to execute it first:&lt;BR /&gt;&lt;BR /&gt;$ @A.COM&lt;BR /&gt;$ RUN MY_PASCAL_PROGRAM&lt;BR /&gt;&lt;BR /&gt;  You should also investigate what your procedure is doing to see if it might be better implemented in Pascal, calling system services or library routines.&lt;BR /&gt;&lt;BR /&gt;  Executing a procedure from within the program will require either a SPAWNed subprocess (LIB$SPAWN) or chaining (LIB$DO_COMMAND). Note that DO_COMMAND terminates the running program.&lt;BR /&gt;&lt;BR /&gt;  LIB$SPAWN can either be synchronous (ie: your program waits for the subprocess to terminate before proceeding), or asynchronous. Wim's suggestion "flags := CLI$M_NOWAIT" makes it asynchronous.&lt;BR /&gt;&lt;BR /&gt;  To use either routine, you should inherit the LIB$ module:&lt;BR /&gt;&lt;BR /&gt;[INHERIT ('SYS$SHARE:PASCAL$LIB_ROUTINES')]&lt;BR /&gt;&lt;BR /&gt;  See: HP OpenVMS RTL Library (LIB$) Manual for details.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/82final/5932/5932PRO.HTML" target="_blank"&gt;http://h71000.www7.hp.com/doc/82final/5932/5932PRO.HTML&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;  To see the Pascal definition:&lt;BR /&gt;&lt;BR /&gt;$ SEARCH SYS$SHARE:PASCAL$LIB_ROUTINES.LIS LIB$SPAWN /WINDOW=30&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2005 15:41:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678379#M50758</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2005-11-24T15:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: VAX PASCAL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678380#M50759</link>
      <description>Sunil,&lt;BR /&gt;&lt;BR /&gt;I am not sure how much you familier using LIB$SPAWN RTL routines, but as you mentioned you want execute A.com when program actually starts run ( is it before pascal start run ?), then I would like to suggest you better include $RUN PasProg.exe command line inside A.com at the end. Like&lt;BR /&gt;A.com&lt;BR /&gt;=====&lt;BR /&gt;$define....&lt;BR /&gt;$assign....&lt;BR /&gt;$dclsym=="JOBName"&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;$run PasProg.exe&lt;BR /&gt;$deassign...&lt;BR /&gt;$exit&lt;BR /&gt;&lt;BR /&gt;Or if you want to execute A.com in the middle of your pascal program, then as Mr.WIM said, LIB$SPAWN is the next easiest way in VMS.&lt;BR /&gt;&lt;BR /&gt;Also if you require to pass/process any DCL symbol from DCL and pascal back and forth, you can use LIB$GET_SYMBOL and LIB$DELETE_SYMBOL routines.&lt;BR /&gt;&lt;BR /&gt;there is little more related info in this link under "Why do lib$spawn, lib$set_symbol fail in detached&lt;BR /&gt;                 processes?"&lt;BR /&gt;&lt;A href="http://www.levitte.org/~ava/txt/vmsfaq.txt" target="_blank"&gt;http://www.levitte.org/~ava/txt/vmsfaq.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Archunan</description>
      <pubDate>Thu, 24 Nov 2005 17:09:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vax-pascal/m-p/3678380#M50759</guid>
      <dc:creator>Arch_Muthiah</dc:creator>
      <dc:date>2005-11-24T17:09:44Z</dc:date>
    </item>
  </channel>
</rss>

