<?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 syntax to IBM Mainframe in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193993#M96191</link>
    <description>I chose to follow the PIPE command approach and have a working solution.  Worked to get the right combination of single and double quotes... &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;John</description>
    <pubDate>Tue, 08 Sep 2009 20:46:38 GMT</pubDate>
    <dc:creator>John T. Farmer</dc:creator>
    <dc:date>2009-09-08T20:46:38Z</dc:date>
    <item>
      <title>FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193987#M96185</link>
      <description>&lt;!--!*#--&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Does anyone have the proper DCL syntax to put a file to IBM mainframe system. The destination is a mainframe dataset gdg. I'm told I need to wrap the name in single quotes, &lt;BR /&gt;&lt;BR /&gt;example:&lt;BR /&gt;$ FTP/INPUT=FTPSCRIPT.TXT IBM1.MYCOMPANY.COM &lt;BR /&gt;&lt;BR /&gt;where FTPSCRIPT.TXT IS&lt;BR /&gt;&lt;BR /&gt;MyUsername&lt;BR /&gt;MyPassword&lt;BR /&gt;put TEST.DAT "'ABC.123.XYZ(+1)'"&lt;BR /&gt;bye&lt;BR /&gt;&lt;BR /&gt;Now the problem:  I need to represent the dataset name inside quotes for a quoted string as P1 parameter for my ftp procedure.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;$ VMSFILE="TESTDIR:CLI_TEST_ELIG.DAT"&lt;BR /&gt;$ FTPFILE="'TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)'"&lt;BR /&gt;$ @FTPFILE "SHOWSCRIPT, FTPID=MAINFRAM, VMSFILE=''VMSFILE', FTPFILE=''FTPFILE'"&lt;BR /&gt;&lt;BR /&gt;I need to get double quotes around the data set name. Script is produced with only the single quotes of course.&lt;BR /&gt;&lt;BR /&gt;BRNTWD&lt;BR /&gt;BRNTW00D&lt;BR /&gt;asc&lt;BR /&gt;put TESTDIR:CLI_TEST_ELIG.DAT 'TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)'&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I can't get the right combination of " around the name.&lt;BR /&gt;&lt;BR /&gt;Thanks for suggestions,&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Wed, 19 Aug 2009 02:29:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193987#M96185</guid>
      <dc:creator>John T. Farmer</dc:creator>
      <dc:date>2009-08-19T02:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193988#M96186</link>
      <description>&lt;!--!*#--&gt;You lost me.  However:&lt;BR /&gt;&lt;BR /&gt;alp $ type sp1.com&lt;BR /&gt;$ write sys$output p1&lt;BR /&gt;$ write sys$output "''p1'"&lt;BR /&gt;alp $ @ sp1.com fred&lt;BR /&gt;FRED&lt;BR /&gt;FRED&lt;BR /&gt;alp $ @ sp1.com "fred"&lt;BR /&gt;fred&lt;BR /&gt;fred&lt;BR /&gt;alp $ @ sp1.com ""fred""&lt;BR /&gt;FRED&lt;BR /&gt;FRED&lt;BR /&gt;alp $ @ sp1.com """fred"""&lt;BR /&gt;"fred"&lt;BR /&gt;FRED&lt;BR /&gt;alp $ @ sp1.com """"fred""""&lt;BR /&gt;"FRED"&lt;BR /&gt;FRED&lt;BR /&gt;alp $ @ sp1.com """""fred"""""&lt;BR /&gt;""fred""&lt;BR /&gt;"fred"&lt;BR /&gt;alp $ @ sp1.com """"""fred""""""&lt;BR /&gt;""FRED""&lt;BR /&gt;"FRED"&lt;BR /&gt;alp $ @ sp1.com """""""fred"""""""&lt;BR /&gt;"""fred"""&lt;BR /&gt;"FRED"&lt;BR /&gt;alp $ @ sp1.com """"""""fred""""""""&lt;BR /&gt;"""FRED"""&lt;BR /&gt;"FRED"&lt;BR /&gt;alp $ @ sp1.com """""""""fred"""""""""&lt;BR /&gt;""""fred""""&lt;BR /&gt;""fred""&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;Stop when you see what you want.</description>
      <pubDate>Wed, 19 Aug 2009 02:54:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193988#M96186</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-08-19T02:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193989#M96187</link>
      <description>[ be sure to paste the original topic and this reply into a notepad or something with a fixed size font! ]&lt;BR /&gt;&lt;BR /&gt;Not sure I managed to follow the problem description exactly.&lt;BR /&gt;&lt;BR /&gt;Anyway... Typically one just keeps adding double-double quotes within a quoted string until your get the desired. Every time the symbol is substitute, a set will turn to single.&lt;BR /&gt;&lt;BR /&gt;So if your downstream proceduces insist to assigning  variables through substitution, then you may well need 4 or 8 double quotes in a row.&lt;BR /&gt;&lt;BR /&gt;You may want to review the procedures used to change to use string concatenation instead of substitution.&lt;BR /&gt;&lt;BR /&gt;So instead of &lt;BR /&gt;$ a = """aap"""&lt;BR /&gt;$ b = """noot"""&lt;BR /&gt;$ c = "''a' ''b'"&lt;BR /&gt;$ show symb c&lt;BR /&gt;  C = "AAP NOOT"&lt;BR /&gt;&lt;BR /&gt;or even &lt;BR /&gt;&lt;BR /&gt;$ aa  = """""aap"""""&lt;BR /&gt;$ bb  = """""noot"""""&lt;BR /&gt;$ cc = "''aa' ''bb'"&lt;BR /&gt;  CC = ""aap" "noot""&lt;BR /&gt;&lt;BR /&gt;use: &lt;BR /&gt;&lt;BR /&gt;$ x = a + " " + b&lt;BR /&gt;$ show symb x&lt;BR /&gt;  X = ""aap" "noot""&lt;BR /&gt;$ write sys$output  x&lt;BR /&gt;"aap" "noot"&lt;BR /&gt;&lt;BR /&gt;That typically helps me keep my sanity.&lt;BR /&gt;&lt;BR /&gt;That and helper symbols like &lt;BR /&gt;$ q = "'" &lt;BR /&gt;$ qq = """"&lt;BR /&gt;&lt;BR /&gt;Sometimes it helps to used the 'delayed' substitution operator &amp;amp;. I&lt;BR /&gt;&lt;BR /&gt;$ y = &amp;amp;a + " " + &amp;amp;b&lt;BR /&gt;$ show symb y&lt;BR /&gt;  Y = "aap noot"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Aug 2009 03:15:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193989#M96187</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-08-19T03:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193990#M96188</link>
      <description>John,&lt;BR /&gt;  Note that you can parameterise FTP scripts using PIPE:&lt;BR /&gt;&lt;BR /&gt;$ srcfile="TESTDIR:CLI_TEST_ELIG.DAT"&lt;BR /&gt;$ dstfile="'TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)'"&lt;BR /&gt;$ OUT="WRITE SYS$OUTPUT"&lt;BR /&gt;$ PIPE (OUT "ASCII" ; -&lt;BR /&gt;        OUT "PUT ''srcfile' ''dstfile'" ; -&lt;BR /&gt;        OUT "BYE") | -&lt;BR /&gt; FTP/INPUT=SYS$PIPE/USER="''User'"/PASSWORD="''Pass'" 'node'&lt;BR /&gt;&lt;BR /&gt;If you want to specify the dataset name without quotes and have the script add them, try:&lt;BR /&gt;&lt;BR /&gt;$ srcfile="TESTDIR:CLI_TEST_ELIG.DAT"&lt;BR /&gt;$ dstfile="TLVPC.OPDCD.TCOB.CB30073.ELIG(+1)"&lt;BR /&gt;$ OUT="WRITE SYS$OUTPUT"&lt;BR /&gt;$ PIPE (OUT "ASCII" ; -&lt;BR /&gt;        OUT "PUT ''srcfile' '"+dstfile+"'" ; -&lt;BR /&gt;        OUT "BYE") | -&lt;BR /&gt; FTP/INPUT=SYS$PIPE/USER="''User'"/PASSWORD="''Pass'" 'node'&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Aug 2009 03:36:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193990#M96188</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-08-19T03:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193991#M96189</link>
      <description>The COPY /FTP command (which was first available in V6.2) is generally easier than the ftp utility.  Usually far easier.&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;Quote the target file spec, and you can stick most anything into it that you want; that the remote end requires.&lt;BR /&gt;&lt;BR /&gt;COPY/FTP [/BINARY or /ASCII] -&lt;BR /&gt;foo.txt -&lt;BR /&gt; ibm1.example.com"user pass"::"what-+=ever ?? you !! want"&lt;BR /&gt;&lt;BR /&gt;The remote spec is passed to the far end for processing.&lt;BR /&gt;&lt;BR /&gt;If you need double quotes IN that remote string, then double those within the quoted string.&lt;BR /&gt;&lt;BR /&gt;COPY/FTP [/BINARY or /ASCII] -&lt;BR /&gt;foo.txt -&lt;BR /&gt; ibm1.example.com"user pass"::"He said ""hello"" to me"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Aug 2009 11:52:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193991#M96189</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-08-19T11:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193992#M96190</link>
      <description>Thank you all for the tips, suggestions and sample code.  This is my first encounter with IBM mainframe as the ftp server, and my DCL ftp scripting procedures which worked on other platforms has problems with this syntax.  I will study this today and report back with my success shortly.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;John F.</description>
      <pubDate>Wed, 19 Aug 2009 12:03:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193992#M96190</guid>
      <dc:creator>John T. Farmer</dc:creator>
      <dc:date>2009-08-19T12:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: FTP syntax to IBM Mainframe</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193993#M96191</link>
      <description>I chose to follow the PIPE command approach and have a working solution.  Worked to get the right combination of single and double quotes... &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Tue, 08 Sep 2009 20:46:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ftp-syntax-to-ibm-mainframe/m-p/5193993#M96191</guid>
      <dc:creator>John T. Farmer</dc:creator>
      <dc:date>2009-09-08T20:46:38Z</dc:date>
    </item>
  </channel>
</rss>

