<?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: SFTP in batch mode in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281662#M60682</link>
    <description>&lt;!--!*#--&gt;&amp;gt; [...] V5.5 - ECO 1&lt;BR /&gt;&lt;BR /&gt;Is that the latest ECO?  (I'd look for&lt;BR /&gt;myself, if I still had any useful patch&lt;BR /&gt;access.)  If not, then that'd be my first&lt;BR /&gt;step.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] How can I see the output.&lt;BR /&gt;&lt;BR /&gt;Uh, stop sending it to NL:?  I'd say that the&lt;BR /&gt;time to start thinking about using NL: for&lt;BR /&gt;anything is _after_ you get something to&lt;BR /&gt;work.&lt;BR /&gt;&lt;BR /&gt;A Forum search for keywords like, say:&lt;BR /&gt;      sftp batch&lt;BR /&gt;should find some examples where this worked.</description>
    <pubDate>Tue, 10 May 2011 11:50:12 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2011-05-10T11:50:12Z</dc:date>
    <item>
      <title>SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281659#M60679</link>
      <description>SFTP works for me in interactive mode, but not when I try to use the batch option. Then there is no output.&lt;BR /&gt;&lt;BR /&gt;$ ty ls.txt&lt;BR /&gt;pwd&lt;BR /&gt;ls&lt;BR /&gt;quit&lt;BR /&gt;$ set ver&lt;BR /&gt;$ define/user sys$command nl:&lt;BR /&gt;$ sftp "-B" ls.txt user@host&lt;BR /&gt;$ set nover&lt;BR /&gt;&lt;BR /&gt;The same occurs when I submit it as a batch job.&lt;BR /&gt;&lt;BR /&gt;tcpip sh version&lt;BR /&gt;&lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.5 - ECO 1&lt;BR /&gt;  on an AlphaStation DS15 running OpenVMS V8.2&lt;BR /&gt;    &lt;BR /&gt;Any ideas what I am doing wrong? How can I see the output.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 May 2011 10:34:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281659#M60679</guid>
      <dc:creator>Mark Battle</dc:creator>
      <dc:date>2011-05-10T10:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281660#M60680</link>
      <description>&lt;P&gt;Hi Mark,&lt;BR /&gt;&lt;BR /&gt;ssh/sftp/scp in BATCH mode REQUIRES "passwordless" authentication such as publickey or hostbased.&lt;BR /&gt;&lt;BR /&gt;You cannot supply a password in batch mode.&lt;BR /&gt;&lt;BR /&gt;Use the itrc search facility to see several threads on using sftp in batch mode on OpenVMS. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/Networking/Using-SFTP-in-a-batch-job/m-p/4777756#M9817" target="_blank"&gt;http://h30499.www3.hp.com/t5/Networking/Using-SFTP-in-a-batch-job/m-p/4777756#M9817&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;There are quite a lot of threads with examples of capturing output from sftp and/or ssh batch procedures.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/Languages-and-Scripting/SSH-capturing-output-within-a-PIPE-stream/m-p/5267853#M12767" target="_blank"&gt;http://h30499.www3.hp.com/t5/Languages-and-Scripting/SSH-capturing-output-within-a-PIPE-stream/m-p/5267853#M12767&lt;/A&gt;&lt;BR /&gt;Duncan&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2011 15:13:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281660#M60680</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2011-08-02T15:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281661#M60681</link>
      <description>Sorry I should have stated that I am using public/private keys and not passwords.&lt;BR /&gt;&lt;BR /&gt;Anyway if I was using passwords, I would have expected to see an error message.</description>
      <pubDate>Tue, 10 May 2011 11:05:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281661#M60681</guid>
      <dc:creator>Mark Battle</dc:creator>
      <dc:date>2011-05-10T11:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281662#M60682</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] V5.5 - ECO 1&lt;BR /&gt;&lt;BR /&gt;Is that the latest ECO?  (I'd look for&lt;BR /&gt;myself, if I still had any useful patch&lt;BR /&gt;access.)  If not, then that'd be my first&lt;BR /&gt;step.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] How can I see the output.&lt;BR /&gt;&lt;BR /&gt;Uh, stop sending it to NL:?  I'd say that the&lt;BR /&gt;time to start thinking about using NL: for&lt;BR /&gt;anything is _after_ you get something to&lt;BR /&gt;work.&lt;BR /&gt;&lt;BR /&gt;A Forum search for keywords like, say:&lt;BR /&gt;      sftp batch&lt;BR /&gt;should find some examples where this worked.</description>
      <pubDate>Tue, 10 May 2011 11:50:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281662#M60682</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-05-10T11:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281663#M60683</link>
      <description>I tried it first without &lt;BR /&gt;define/user sys$command nl:&lt;BR /&gt;&lt;BR /&gt;I added that line because a search here for sftp batch suggested that that was a good thing to do.</description>
      <pubDate>Tue, 10 May 2011 11:58:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281663#M60683</guid>
      <dc:creator>Mark Battle</dc:creator>
      <dc:date>2011-05-10T11:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281664#M60684</link>
      <description>&lt;!--!*#--&gt;
&lt;P&gt;&amp;gt; I added that line because a search here for&lt;BR /&gt;&amp;gt; sftp batch suggested that that was a good&lt;BR /&gt;&amp;gt; thing to do.&lt;BR /&gt;&lt;BR /&gt;If only my psychic powers were stronger, then&lt;BR /&gt;I might be able to see your search results.&lt;BR /&gt;_Then_ I might be able to judge the value of&lt;BR /&gt;that suggestion. (Or even know that it had&lt;BR /&gt;no effect.)&lt;BR /&gt;&lt;BR /&gt;_My_ search results included this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/Networking/Using-SFTP-in-a-batch-job/m-p/4777756#M9817" target="_blank"&gt;http://h30499.www3.hp.com/t5/Networking/Using-SFTP-in-a-batch-job/m-p/4777756#M9817&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;which seems to offer a pretty similar working&lt;BR /&gt;example.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Is that the latest ECO?&lt;BR /&gt;&lt;BR /&gt;Still wondering. TCPIP is seldom bug-free,&lt;BR /&gt;but any version that old with only one ECO&lt;BR /&gt;seems to me to be a poor risk.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2011 21:56:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281664#M60684</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-08-08T21:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281665#M60685</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;even with a current version of TCPIP services&lt;BR /&gt;&lt;BR /&gt;$tcpip show ver&lt;BR /&gt;&lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.7 - ECO 2&lt;BR /&gt;  on an AlphaServer 400 4/166 running OpenVMS V8.4&lt;BR /&gt;&lt;BR /&gt;the procedure never terminates, if you redefine sys$command when run in batch or interactive mode. The issuing process returns the file list, but never processes the command following the ls, remaining in a loop.&lt;BR /&gt;&lt;BR /&gt;Drop the "define", and the job runs correctly. See the attached output from 2 runs.&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 May 2011 15:22:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281665#M60685</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2011-05-10T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281666#M60686</link>
      <description>&lt;P&gt;Duncan,&lt;BR /&gt;&lt;BR /&gt;Strange. My script does not hang. With or without the define no output is produced. &lt;BR /&gt;&lt;BR /&gt;I introduced the define as a result of the following thread&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/General/Redirecting-output-from-sftp/m-p/5264499#M27630" target="_blank"&gt;http://h30499.www3.hp.com/t5/General/Redirecting-output-from-sftp/m-p/5264499#M27630&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here Joerg Mohren also sees looping. I have now followed the solution of RBrown, but this resulted in an empty output file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2011 21:57:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281666#M60686</guid>
      <dc:creator>Mark Battle</dc:creator>
      <dc:date>2011-08-08T21:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281667#M60687</link>
      <description>Hello Mark,&lt;BR /&gt;&lt;BR /&gt;Here is a working example of what you are trying to do performed on my system.  You'll just need to modify a few things to match your environment.&lt;BR /&gt;&lt;BR /&gt;$! Main procedure submitted to batch&lt;BR /&gt;$!&lt;BR /&gt;$ type sftp_hprc.com&lt;BR /&gt;$ set verify&lt;BR /&gt;$ define/nolog sys$login SYS$SYSROOT:[W_MCGAW]&lt;BR /&gt;$ set def SYS$SYSDEVICE:[W_MCGAW]&lt;BR /&gt;$ create ls.txt&lt;BR /&gt;$ deck&lt;BR /&gt;pwd&lt;BR /&gt;ls&lt;BR /&gt;$ eod&lt;BR /&gt;$ sftp "-Bls.txt" W_MCGAW@HOSER&lt;BR /&gt;&lt;BR /&gt;Command to submit:&lt;BR /&gt;&lt;BR /&gt; $ submit/noprint/log=SYS$SYSDEVICE:[W_MCGAW]SFTP_HPRC.LOG/notify SFTP_HPRC.COM&lt;BR /&gt;&lt;BR /&gt;Job SFTP_HPRC (queue SYS$BATCH, entry 99) started on SYS$BATCH&lt;BR /&gt;&lt;BR /&gt;Job SFTP_HPRC (queue SYS$BATCH, entry 99) completed&lt;BR /&gt;&lt;BR /&gt;The log file that was created:&lt;BR /&gt;&lt;BR /&gt;$ TYPE SFTP_HPRC.LOG&lt;BR /&gt;$ Set NoOn&lt;BR /&gt;$ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))&lt;BR /&gt;%SET-W-NOTSET, error modifying DKC0:&lt;BR /&gt;-SET-E-INVDEV, device is invalid for requested operation&lt;BR /&gt;  11-MAY-2011 07:35:22&lt;BR /&gt;$ define/nolog sys$login SYS$SYSROOT:[W_MCGAW]&lt;BR /&gt;$ set def SYS$SYSDEVICE:[W_MCGAW]&lt;BR /&gt;$ create ls.txt&lt;BR /&gt;pwd&lt;BR /&gt;ls&lt;BR /&gt;$ sftp "-Bls.txt" W_MCGAW@HOSER&lt;BR /&gt;&lt;BR /&gt;&lt;LOTS of="" blank="" space="" here=""&gt;&lt;BR /&gt;&lt;BR /&gt; Welcome to OpenVMS (TM) Alpha Operating System, Version V8.3&lt;BR /&gt;&lt;BR /&gt;Warning: Converting file ls.txt to Stream_LF.&lt;BR /&gt;Warning: File ls.txt converted successfully to Stream_LF.&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;&lt;BR /&gt;SYS$SYSDEVICE:[W_MCGAW]&lt;BR /&gt;sftp&amp;gt; ls&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.&lt;BR /&gt;ACCOUNTING_LOGS.DIR;1&lt;BR /&gt;BACKUP.COM;2&lt;BR /&gt;BACKUP.COM;1&lt;BR /&gt;BUILD_DCL.COM;10&lt;BR /&gt;CONTAINER.BCK;4&lt;BR /&gt;    .&lt;BR /&gt;    .&lt;BR /&gt;    .&lt;BR /&gt;ZIP-ALPHA.EXE;1&lt;BR /&gt;&lt;BR /&gt;  W_MCGAW      job terminated at 11-MAY-2011 07:35:24.41&lt;BR /&gt;&lt;BR /&gt;  Accounting information:&lt;BR /&gt;  Buffered I/O count:                369      Peak working set size:      10336&lt;BR /&gt;  Direct I/O count:                   92      Peak virtual size:         189056&lt;BR /&gt;  Page faults:                      1315      Mounted volumes:                0&lt;BR /&gt;  Charged CPU time:        0 00:00:00.07      Elapsed time:       0 00:00:02.15&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This seems to do what you are looking for.  Hopefully witha  few small tweaks, you can make this work in your envirnoment.&lt;BR /&gt;&lt;BR /&gt;If not, maybe you can log a call with HP OpenVMS Support for assistance.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Walt McGaw&lt;/LOTS&gt;</description>
      <pubDate>Wed, 11 May 2011 12:40:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281667#M60687</guid>
      <dc:creator>Walt McGaw</dc:creator>
      <dc:date>2011-05-11T12:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281668#M60688</link>
      <description>Problem solved.&lt;BR /&gt;The batch file must be created with Stream_LF format. I had used DCL Create.&lt;BR /&gt;&lt;BR /&gt;Thanks anyway.</description>
      <pubDate>Mon, 16 May 2011 11:22:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281668#M60688</guid>
      <dc:creator>Mark Battle</dc:creator>
      <dc:date>2011-05-16T11:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP in batch mode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281669#M60689</link>
      <description>As above</description>
      <pubDate>Mon, 16 May 2011 11:34:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-in-batch-mode/m-p/5281669#M60689</guid>
      <dc:creator>Mark Battle</dc:creator>
      <dc:date>2011-05-16T11:34:20Z</dc:date>
    </item>
  </channel>
</rss>

