<?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: function in cobol for execute s.o. commands in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196664#M42809</link>
    <description>Yeah, then you'd best just use LIB$SPAWN&lt;BR /&gt;Use the cobol 'STRING' verb to glue together a commandline (pieces DELIMITED  BY SIZE (or 'delimiter), passing that by descriptor.&lt;BR /&gt;Or use SYS$FAO to cobble together a string from multiple pieces.&lt;BR /&gt;&lt;BR /&gt;It's kinda lame there is no calleable FTP, but there isn't.&lt;BR /&gt;Perl has a module implementing am FTP client, but that does not help you much.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;$perl -e "use Net::FTP; $x=Net::FTP-&amp;gt;new (q(10.x.x.x)); $x-&amp;gt;login(q(user),q(pass)); $x-&amp;gt;get(q(tmp.tmp))"&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 01 Sep 2009 20:55:23 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2009-09-01T20:55:23Z</dc:date>
    <item>
      <title>function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196660#M42805</link>
      <description>Hi &lt;BR /&gt;I have a I64VMS COBOL V2.8-1380 under ovms 8.3 1h1&lt;BR /&gt;&lt;BR /&gt;my question is&lt;BR /&gt;&lt;BR /&gt;some one knows any function or lexical o utility that let to me execute a vms command inside of my cobol program (dir,@,show etc)?&lt;BR /&gt;&lt;BR /&gt;regards</description>
      <pubDate>Tue, 01 Sep 2009 19:23:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196660#M42805</guid>
      <dc:creator>Edgar Ulloa</dc:creator>
      <dc:date>2009-09-01T19:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196661#M42806</link>
      <description>&lt;!--!*#--&gt;One possibility: LIB$SPAWN&lt;BR /&gt;&lt;BR /&gt;      HELP RTL_Routines LIB$ LIB$SPAWN&lt;BR /&gt;&lt;BR /&gt;SYS$EXAMPLES may contain some example C code.&lt;BR /&gt;COBOL could be harder to find.&lt;BR /&gt;&lt;BR /&gt;Where did you want the output to go?</description>
      <pubDate>Tue, 01 Sep 2009 19:39:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196661#M42806</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-09-01T19:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196662#M42807</link>
      <description>As Steven indicates, LIB$SPAWN (or its core service SYS$CREPRC can execute commands.&lt;BR /&gt;&lt;BR /&gt;However, while you phrase the problem very generically, I wonder whether you have a specific problem in mind.&lt;BR /&gt;&lt;BR /&gt;I ask this because many OpenVMS task have a calleable interface, which typically allows much more control for perhaps a little bit more coding work.&lt;BR /&gt;&lt;BR /&gt;Specifically you may want to use LIB$FIND_FILE or SYS$PARSE + SYS$SEARCH to find files like 'dir', and SYS$GETJPI (or LIB$GETJPI) to do SHOW PROCESS style work. &lt;BR /&gt;For a commadn file (@) you would need LIB$SPAWN or perhaps start it as a batch job? ( SYS$SNDJBC )&lt;BR /&gt;&lt;BR /&gt;So what problem are you really trying to solve?&lt;BR /&gt;&lt;BR /&gt;My last customer to ask the question how to call @ from Cobol actually wanted to run a command file which they always used to clear the screen... Cobol has that build in!&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;&lt;BR /&gt;Hein</description>
      <pubDate>Tue, 01 Sep 2009 19:52:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196662#M42807</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-09-01T19:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196663#M42808</link>
      <description>Basicly this command I would like execute&lt;BR /&gt;&lt;BR /&gt;$copy/ftp/anon arch.dat 10.x.x.x::comdet'dato1''dato2''dato3'.pf8&lt;BR /&gt;&lt;BR /&gt;regards</description>
      <pubDate>Tue, 01 Sep 2009 20:34:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196663#M42808</guid>
      <dc:creator>Edgar Ulloa</dc:creator>
      <dc:date>2009-09-01T20:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196664#M42809</link>
      <description>Yeah, then you'd best just use LIB$SPAWN&lt;BR /&gt;Use the cobol 'STRING' verb to glue together a commandline (pieces DELIMITED  BY SIZE (or 'delimiter), passing that by descriptor.&lt;BR /&gt;Or use SYS$FAO to cobble together a string from multiple pieces.&lt;BR /&gt;&lt;BR /&gt;It's kinda lame there is no calleable FTP, but there isn't.&lt;BR /&gt;Perl has a module implementing am FTP client, but that does not help you much.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;$perl -e "use Net::FTP; $x=Net::FTP-&amp;gt;new (q(10.x.x.x)); $x-&amp;gt;login(q(user),q(pass)); $x-&amp;gt;get(q(tmp.tmp))"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Sep 2009 20:55:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196664#M42809</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-09-01T20:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196665#M42810</link>
      <description>Edgar,&lt;BR /&gt;&lt;BR /&gt;  Unfortunately COPY doesn't have a callable interface. For a normal copy, you can get by with callable convert CONV$CONVERT, but that won't help you with COPY/FTP.&lt;BR /&gt;&lt;BR /&gt;  I'm not aware of any callable interface for FTP, other than talking the protocol yourself using sockets. So, you're really left with SPAWN. In its simplest form in COBOL it would look something like:&lt;BR /&gt;&lt;BR /&gt;  CALL "LIB$SPAWN" USING BY DESCRIPTOR "copy/ftp/anon arch.dat 10.x.x.x::comdet'dato1''dato2''dato3'.pf8"&lt;BR /&gt;  GIVING SpawnStatus&lt;BR /&gt;&lt;BR /&gt;of course, you can build up the string in a variable and pass it, but be careful to make sure the descriptor gets the correct length.&lt;BR /&gt;&lt;BR /&gt;Any output, including error messages would go to SYS$OUTPUT. See the LIB RTL manual for details of the (many) other arguments.&lt;BR /&gt;&lt;BR /&gt;Also note that this will only work from a process with a CLI (includes interactive, batch and network processes, but not all detached processes).</description>
      <pubDate>Tue, 01 Sep 2009 20:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196665#M42810</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-09-01T20:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196666#M42811</link>
      <description>&lt;BR /&gt;  &lt;A href="http://nbpfaus.net/~pfau/ftplib/" target="_blank"&gt;http://nbpfaus.net/~pfau/ftplib/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;is a callable FTP interface.&lt;BR /&gt;&lt;BR /&gt;Never used it myself, but looks promising.&lt;BR /&gt;&lt;BR /&gt;BTW: the "/anonym" option is not available for  all VMS FTP clients.</description>
      <pubDate>Wed, 02 Sep 2009 05:40:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196666#M42811</guid>
      <dc:creator>Joseph Huber_1</dc:creator>
      <dc:date>2009-09-02T05:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: function in cobol for execute s.o. commands</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196667#M42812</link>
      <description>Thanks for your time&lt;BR /&gt;&lt;BR /&gt;now used another external aplication for transfer.&lt;BR /&gt;&lt;BR /&gt;cheers</description>
      <pubDate>Tue, 08 Sep 2009 20:26:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/function-in-cobol-for-execute-s-o-commands/m-p/5196667#M42812</guid>
      <dc:creator>Edgar Ulloa</dc:creator>
      <dc:date>2009-09-08T20:26:49Z</dc:date>
    </item>
  </channel>
</rss>

