<?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: FTP command file issue in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458627#M42546</link>
    <description>Dave,&lt;BR /&gt;&lt;BR /&gt;please make a text file copy of the command procedure and post it as an attachment.&lt;BR /&gt;&lt;BR /&gt;Without this information, we will be left guessing in the dark.&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
    <pubDate>Mon, 13 Jul 2009 14:10:41 GMT</pubDate>
    <dc:creator>Duncan Morris</dc:creator>
    <dc:date>2009-07-13T14:10:41Z</dc:date>
    <item>
      <title>FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458625#M42544</link>
      <description>Hello, I have a niggle - I've written a .com file with an 'FTP server user pass' line in, but when it's run it immediately logs out.&lt;BR /&gt;What am I doing wrong?</description>
      <pubDate>Mon, 13 Jul 2009 13:58:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458625#M42544</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-13T13:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458626#M42545</link>
      <description>OpenVMS V6.2 with its contemporary IP stacks introduced the COPY /FTP command, which is usually vastly easier to incorporate into a DCL command procedure.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/136" target="_blank"&gt;http://labs.hoffmanlabs.com/node/136&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As for what's wrong with your particular DCL code here, you'll want to post that code, how you're invoking the code ("immediately logs out" can be indicative of a user-mode coding error in some contexts, or of an inner-mode and thus more serious error in others), along with some information on which IP stack and version and ECO level is in use here, and the OpenVMS version.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jul 2009 14:10:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458626#M42545</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-13T14:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458627#M42546</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;please make a text file copy of the command procedure and post it as an attachment.&lt;BR /&gt;&lt;BR /&gt;Without this information, we will be left guessing in the dark.&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Mon, 13 Jul 2009 14:10:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458627#M42546</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2009-07-13T14:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458628#M42547</link>
      <description>$ ftp serv /USERNAME="user" /PASSWORD="pass"&lt;BR /&gt;$ put test.ops "TEST.OPS"&lt;BR /&gt;$ ascii&lt;BR /&gt;$ quit&lt;BR /&gt;&lt;BR /&gt;It gets as far as logging in then comes back with a '221 goodbye'.</description>
      <pubDate>Mon, 13 Jul 2009 14:24:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458628#M42547</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-13T14:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458629#M42548</link>
      <description>I meant to add, when i run each line manually it all works correctly.</description>
      <pubDate>Mon, 13 Jul 2009 14:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458629#M42548</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-13T14:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458630#M42549</link>
      <description>Try:&lt;BR /&gt;&lt;BR /&gt;$ COPY/FTP/ASCII/LOG TEST.OPS -&lt;BR /&gt;SERV"username password"::&lt;BR /&gt;&lt;BR /&gt;Craig</description>
      <pubDate>Mon, 13 Jul 2009 14:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458630#M42549</guid>
      <dc:creator>Craig A</dc:creator>
      <dc:date>2009-07-13T14:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458631#M42550</link>
      <description>Should've added that the put test.ops "TEST.OPS" was because it's going onto a UNIX box, and I need it in uppercase.</description>
      <pubDate>Mon, 13 Jul 2009 14:31:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458631#M42550</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-13T14:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458632#M42551</link>
      <description>The put and quit and such are ftp commands and are not $ DCL commands, and just as soon as the $ ftp command connects, the EOF that arises when an application (FTP) reads its data encounters a $, the connection gets torn down.&lt;BR /&gt;&lt;BR /&gt;If this is V6.2 or later, use this:&lt;BR /&gt;&lt;BR /&gt;$ COPY /FTP /ASCII test.ops -&lt;BR /&gt;server"user pass"::TEST.OPTS&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;If this is older or if you want to use the hard way, then use this:&lt;BR /&gt;&lt;BR /&gt;$ ftp serv /USERNAME="user" /PASSWORD="pass"&lt;BR /&gt;ascii&lt;BR /&gt;put test.ops TEST.OPS&lt;BR /&gt;quit&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;And the next thing you'll usually encounter with "the hard way" is that you can't do DCL symbol substitution in the commands, which means you need to use a custom-created file for the transfer and @ it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/1339" target="_blank"&gt;http://labs.hoffmanlabs.com/node/1339&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;An example of building a data file from DCL:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/163" target="_blank"&gt;http://labs.hoffmanlabs.com/node/163&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you're just getting going with DCL and DCL procedures, have a look at the User's Guide in the OpenVMS manual set, too.</description>
      <pubDate>Mon, 13 Jul 2009 14:33:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458632#M42551</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-13T14:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458633#M42552</link>
      <description>&amp;gt; I meant to add, when i run each line manually it all works correctly.&lt;BR /&gt;&lt;BR /&gt;I would doubt you entered ftp&amp;gt; $ put&lt;BR /&gt;&lt;BR /&gt;In a DCL procedure, the $ is a flag that indicates "this is a DCL command".  Bash doesn't have something similar here, if you're coming over from Unix.  The $ differentiates between commands and data.  Commands have symbol substitution and other such, and data does not.  And the very first $ that an application reads is treated as an EOF for the application command input. &lt;BR /&gt;&lt;BR /&gt;Unless you need to use a leading $ on your application input data, and then you use $ DECK and $ EOD commands.  Which is described here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/1339" target="_blank"&gt;http://labs.hoffmanlabs.com/node/1339&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jul 2009 14:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458633#M42552</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-13T14:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458634#M42553</link>
      <description>ps: please always post your OpenVMS version and architecture.  With that detail (for instance, in this case), we can tell if COPY /FTP (or some analogous mechanism) is an option, or whether there are other ways to get the file specification replicated over to the Unix box in the appropriate file case.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Jul 2009 14:39:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458634#M42553</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-13T14:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458635#M42554</link>
      <description>As hinted by Hoff, remove the "$" symbols from the lines following "$ ftp ..."&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Mon, 13 Jul 2009 17:16:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458635#M42554</guid>
      <dc:creator>The Brit</dc:creator>
      <dc:date>2009-07-13T17:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458636#M42555</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;One method that I haven't seen mentioned yet in this thread, is the use of ftp host /input=vms_file_with_ftp_commands  The input file can have the remote username and password as the first two lines of the input file, followed by ftp commands to execute (including quit), alternatively, the username and password can be passed on the DCL FTP command line with /username and /password.  In this case the /input file should not have the username and password.  In other words, if the username and password are not specified using the command line /username and /password, then FTP will be expecting the username and password as the first two lines of input.&lt;BR /&gt;&lt;BR /&gt;The integration of FTP in DCL commands is nowhere as seemless as the integration of DECnet into DCL.   For example there is no $ RENAME/FTP DCL command.  Also, some things just won't work when initiating a tcp session for each command, for example something like "quote site umask" commands, which only remain in effect only for the duration of the ftp session.&lt;BR /&gt;&lt;BR /&gt;Example code to copy from 'vms_name' to 'unix_name' while making the 'unix_name' appear to be 'atomically' created.  This transfers to a temporary file nmae 'xfr_name' on the remote side, then uses ftp rename to rename the file on the remote side.  Note: There is no VMS command RENAME/FTP&lt;BR /&gt;&lt;BR /&gt;$   pid = f$getjpi("","PID")&lt;BR /&gt;$   temp = "sys$scratch:ftpinput.''pid';"&lt;BR /&gt;$   create 'temp'&lt;BR /&gt;$   temp = f$search(temp)&lt;BR /&gt;$   close/nolog ftpcmd&lt;BR /&gt;$   open/append ftpcmd 'temp'&lt;BR /&gt;$   write ftpcmd "''ftp_user'"&lt;BR /&gt;$   write ftpcmd "''ftp_usrp'"&lt;BR /&gt;$   write ftpcmd "ascii"&lt;BR /&gt;$   write ftpcmd "quote site umask 111" ! change default protection for created files to -rw-rw-rw-&lt;BR /&gt;$   write ftpcmd "put ''vms_name' ''xfr_name'"&lt;BR /&gt;$   write ftpcmd "rename ''xfr_name' ''unix_name'"&lt;BR /&gt;$   write ftpcmd "quit"&lt;BR /&gt;$   close/nolog ftpcmd&lt;BR /&gt;$   if .not. debug&lt;BR /&gt;$   then&lt;BR /&gt;$     define/user sys$output nla0:&lt;BR /&gt;$   else&lt;BR /&gt;$     type* 'temp'&lt;BR /&gt;$   endif&lt;BR /&gt;$   set noon ! so we can manually process ftp status&lt;BR /&gt;$   ftp 'ftp_srv' /input='temp'&lt;BR /&gt;$   ftp_copy_code := '$status'/'$severity'&lt;BR /&gt;$   ftp_copy_status = f$element(0,"/",ftp_copy_code)&lt;BR /&gt;$   ftp_copy_severity = f$element(1,"/",ftp_copy_code)&lt;BR /&gt;$   last_status = ftp_copy_status&lt;BR /&gt;$   if ftp_copy_severity .eq. 1&lt;BR /&gt;$   then&lt;BR /&gt;$     ! put code here to be executed if file was successfully copied&lt;BR /&gt;$      'nodeb' delete* 'temp'&lt;BR /&gt;$   else&lt;BR /&gt;$     ! put code here to be executed if file copy failed&lt;BR /&gt;$   endif&lt;BR /&gt;&lt;BR /&gt;The biggest disadvantage of this method is that you have very limited error handling, about all you know it that the whole sequence succeeded, or that some part of it failed, but which part is not easy to determine.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Mon, 13 Jul 2009 18:32:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458636#M42555</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-07-13T18:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458637#M42556</link>
      <description>Thanks to one and all for your incisive comments and help (I'm on VMS8.3-1 by the way).&lt;BR /&gt;&lt;BR /&gt;The copy/ftp command worked nicely, but didn't put the file onto the UNIX box in uppercase, which the FTP command minus the $s did, so I'm going with that for the time being.&lt;BR /&gt;Thanks again everyone.&lt;BR /&gt;dave.&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Jul 2009 07:16:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458637#M42556</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-14T07:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458638#M42557</link>
      <description>Actually have placed the uppercase filename in "", now the copy/ftp command works like a dream :o)</description>
      <pubDate>Tue, 14 Jul 2009 08:27:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458638#M42557</guid>
      <dc:creator>Dave Deacon-Holmes</dc:creator>
      <dc:date>2009-07-14T08:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: FTP command file issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458639#M42558</link>
      <description>Quoting the target file specification is likely the most appropriate approach here.&lt;BR /&gt;&lt;BR /&gt;I'll presume you're on OpenVMS I64 V8.2-1 or (more likely) OpenVMS I64 V8.3-1H1 here (AFAIK, there's no V8.3-1), and these versions also mean you can also alter your DCL-level command parsing settings as required.    Specifically, this is the SET PROCESS /PARSE=EXTENDED command.  This mechanism preserves file case (case-preserving, case-blind) and how application-level switches (foreign commands) and related are processed.  &lt;BR /&gt;&lt;BR /&gt;The extended parsing mechanism is often associated with making full use of ODS-5 disk structures, but is a separate process-level selection knob.&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Jul 2009 11:43:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-command-file-issue/m-p/4458639#M42558</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-14T11:43:02Z</dc:date>
    </item>
  </channel>
</rss>

