<?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: passing variable to connect direct in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698694#M57375</link>
    <description>Did the intermediate file come out ok? What does "cat ./myfile" show?</description>
    <pubDate>Mon, 08 Apr 2002 03:01:10 GMT</pubDate>
    <dc:creator>Deepak Extross</dc:creator>
    <dc:date>2002-04-08T03:01:10Z</dc:date>
    <item>
      <title>passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698686#M57367</link>
      <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I posted this question last night but in the wrong area, so here goes again&lt;BR /&gt;&lt;BR /&gt;I have a whole bunch of files in a directory that I need to submit using connect direct&lt;BR /&gt;&lt;BR /&gt;I have created the following script to do this.&lt;BR /&gt;&lt;BR /&gt;It works if I submit one file manually - However there is more than one file and having to past each file into the submit defeats the object&lt;BR /&gt;&lt;BR /&gt;#!/usr/sbin/sh&lt;BR /&gt;cd $XELOGD/connectd&lt;BR /&gt;ls xeSnd* &amp;gt; $XELOGD/connectd/cube&lt;BR /&gt;&lt;BR /&gt;CUBES=cube&lt;BR /&gt;for file in $(cat $CUBE)&lt;BR /&gt;do&lt;BR /&gt;export $file&lt;BR /&gt;echo 'submit file=/tmp/$file;' | direct | grep process &amp;gt;&amp;gt; /tmp/processid&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;The above bombs out with the message&lt;BR /&gt;&lt;BR /&gt;XSQF009I  Return Code: 8  Feedback: 2&lt;BR /&gt;          :&amp;amp;FILENAME=/tmp/$file:&amp;amp;OSERR=2:&lt;BR /&gt;&lt;BR /&gt;XAPI006I  Return Code: 0  Feedback: 0&lt;BR /&gt;          Specified file could not be opened.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated&lt;BR /&gt;&lt;BR /&gt;Thanks in advance &lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Apr 2002 20:00:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698686#M57367</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-07T20:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698687#M57368</link>
      <description>aarrghh - the dreaded NDM! You poor soul!&lt;BR /&gt;&lt;BR /&gt;In this case however the error is in your script - replace:&lt;BR /&gt;&lt;BR /&gt;echo 'submit file=/tmp/$file;' | direct | grep process &amp;gt;&amp;gt; /tmp/processid &lt;BR /&gt;&lt;BR /&gt;with:&lt;BR /&gt;&lt;BR /&gt;echo "submit file=/tmp/$file;" | direct | grep process &amp;gt;&amp;gt; /tmp/processid &lt;BR /&gt;&lt;BR /&gt;The single quotes make everything inside them literal (no variable substitution), hence the error message. I seem to remember you should also use the '-x' flag when calling direct from the command line (but I can't remember why!)&lt;BR /&gt;&lt;BR /&gt;echo "submit file=/tmp/$file;" | direct -x | grep process &amp;gt;&amp;gt; /tmp/processid &lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Sun, 07 Apr 2002 20:16:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698687#M57368</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2002-04-07T20:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698688#M57369</link>
      <description>Hi duncan&lt;BR /&gt;&lt;BR /&gt;Nope, it doesn't work&lt;BR /&gt;&lt;BR /&gt;$ echo $(cat $file)&lt;BR /&gt;xeSndCube_CC_C_&lt;HOSTNAME&gt;.26774&lt;BR /&gt;&lt;BR /&gt;$ echo "submit file=/tmp/$file;" |direct -x&lt;BR /&gt;| grep process &amp;gt;&amp;gt; /tmp/process.out&lt;BR /&gt;&lt;BR /&gt;XSQF009I  Return Code: 8  Feedback: 2&lt;BR /&gt;          :&amp;amp;FILENAME=/tmp/file:&amp;amp;OSERR=2:&lt;BR /&gt;&lt;BR /&gt;XAPI006I  Return Code: 0  Feedback: 0&lt;BR /&gt;          Specified file could not be opened.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve&lt;/HOSTNAME&gt;</description>
      <pubDate>Sun, 07 Apr 2002 20:28:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698688#M57369</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-07T20:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698689#M57370</link>
      <description>Steven,&lt;BR /&gt;Have you replaced the HostName with &lt;HOSTNAME&gt; or is it literally&lt;BR /&gt;xeSndCube_CC_C_&lt;HOSTNAME&gt;.26774 ?&lt;BR /&gt;&lt;BR /&gt;If it is a literal, the shell is going to get confused by the '&amp;lt;', which normally is a redirection operator.&lt;BR /&gt;&lt;BR /&gt;This should work:&lt;BR /&gt;xeSndCube_CC_C_\&lt;HOSTNAME&gt;.26774&lt;BR /&gt;&lt;BR /&gt;&lt;/HOSTNAME&gt;&lt;/HOSTNAME&gt;&lt;/HOSTNAME&gt;</description>
      <pubDate>Mon, 08 Apr 2002 00:26:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698689#M57370</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-08T00:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698690#M57371</link>
      <description>Deepak&lt;BR /&gt;&lt;BR /&gt;I only used &lt;HOSTNAME&gt; to mask the name of the host from the forum&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve&lt;/HOSTNAME&gt;</description>
      <pubDate>Mon, 08 Apr 2002 00:55:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698690#M57371</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-08T00:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698691#M57372</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;The issue seems to be with the variable $file being passed to the connect direct session&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 08 Apr 2002 00:58:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698691#M57372</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-08T00:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698692#M57373</link>
      <description>OK, heres another thing you can try.&lt;BR /&gt;&lt;BR /&gt;for file in $(cat $CUBE)                   do                                                                      echo "submit file=/tmp/$file;"&lt;BR /&gt;done &amp;gt;&amp;gt; ./myfile&lt;BR /&gt;&lt;BR /&gt;Check that the contents of myfile are ok, and then run a&lt;BR /&gt;&lt;BR /&gt;for myfile in $(cat ./myfile) &lt;BR /&gt;do &lt;BR /&gt;echo $myfile | direct | grep process &amp;gt;&amp;gt; /tmp/processid &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Mon, 08 Apr 2002 01:51:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698692#M57373</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-08T01:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698693#M57374</link>
      <description>Hi Deepak&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply, still getting the errors, a little different this time though&lt;BR /&gt;&lt;BR /&gt;XPAE003I  Return Code: 8  Feedback: 0&lt;BR /&gt;          :&amp;amp;KEYWD=file:&lt;BR /&gt;&lt;BR /&gt;XPAM001I  Return Code: 8  Feedback: 0&lt;BR /&gt;          Errors Parsing&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Apr 2002 02:45:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698693#M57374</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-08T02:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698694#M57375</link>
      <description>Did the intermediate file come out ok? What does "cat ./myfile" show?</description>
      <pubDate>Mon, 08 Apr 2002 03:01:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698694#M57375</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-08T03:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698695#M57376</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;myfile is fine&lt;BR /&gt;&lt;BR /&gt;submit file=/tmp/xeSndCube_CC_C_SI***W3.26774;&lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Apr 2002 03:05:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698695#M57376</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-08T03:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698696#M57377</link>
      <description>Hmm...looks like it's having a problem with the keyword "submit file".&lt;BR /&gt;Are you sure it's "submit file"? Should it be, perhaps, "submitfile" or "submit_file"?</description>
      <pubDate>Mon, 08 Apr 2002 03:40:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698696#M57377</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-08T03:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698697#M57378</link>
      <description>Deepak&lt;BR /&gt;&lt;BR /&gt;nah man&lt;BR /&gt;&lt;BR /&gt;The command is used with connect direct shell&lt;BR /&gt;&lt;BR /&gt;heres what it looks like when you enter direct from the from prompt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;        ******************************************************&lt;BR /&gt;        *                                                    *&lt;BR /&gt;        *             CONNECT:DirectUNIX                *&lt;BR /&gt;        *                                                    *&lt;BR /&gt;        *----------------------------------------------------*&lt;BR /&gt;        *  Copyright (c) 1983, 2000  Sterling Commerce, Inc. *&lt;BR /&gt;        *                   Version 3.3.03                   *&lt;BR /&gt;        ******************************************************&lt;BR /&gt;&lt;BR /&gt;Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI.&lt;BR /&gt;&lt;BR /&gt;Direct&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I use the submit command for each file that requires sending. &lt;BR /&gt;&lt;BR /&gt;I'm off home now 06:00 in the UK and not back till Friday , I'm determined to get to the bottom of this. I will check for any replies When I get up this afternoon&lt;BR /&gt;&lt;BR /&gt;Thanks very much for your help&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 08 Apr 2002 03:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698697#M57378</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-08T03:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698698#M57379</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;If you want to use the interactive CLI interface, maybe the best way to go about it would be to use "expect".&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.31/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.31/&lt;/A&gt;</description>
      <pubDate>Mon, 08 Apr 2002 05:00:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698698#M57379</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-08T05:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698699#M57380</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I'm not back in the office till Friday to test this further, but was wondering if anyone had any further input regarding this question&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 10 Apr 2002 08:02:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698699#M57380</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-10T08:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698700#M57381</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;I am not familiar with connect direct but just a thought, did you try running in debug mode and see what value is being passed when you do a submit&lt;BR /&gt;&lt;BR /&gt;1) ksh -x scriptname&lt;BR /&gt;2) Also try putting double quotes around /tmp/"$file"&lt;BR /&gt;&lt;BR /&gt;Let us know after you get back ...&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shabu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Apr 2002 22:46:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698700#M57381</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-04-10T22:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to connect direct</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698701#M57382</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I removed the export $file from the script, it now looks like&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;clear&lt;BR /&gt;if [ $LOGNAME != dssadmin ]&lt;BR /&gt;then&lt;BR /&gt;echo "\n\tYou must be dssadmin user to run this script!!!!"&lt;BR /&gt;sleep 5&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&amp;gt; $XELOGD/connectd/records.log&lt;BR /&gt;&lt;BR /&gt;cd $XELOGD/connectd&lt;BR /&gt;ls xeSnd* &amp;gt; $XELOGD/connectd/sendem.log&lt;BR /&gt;sendit=$XELOGD/connectd/sendem.log&lt;BR /&gt;for file in $(cat $sendit)&lt;BR /&gt;do&lt;BR /&gt;ls $file &amp;gt;&amp;gt; $XELOGD/connectd/cubes.log&lt;BR /&gt;done&lt;BR /&gt;CUBES=$XELOGD/connectd/cubes.log&lt;BR /&gt;for files in $(cat $CUBES)&lt;BR /&gt;do&lt;BR /&gt;echo "submit file=/tmp/$files;" | direct -x &amp;gt;&amp;gt; $XELOGD/connectd/processid.log 2&amp;gt;&lt;BR /&gt;&amp;gt; $XELOGD/connectd/errors.log&lt;BR /&gt;done&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help &lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sun, 14 Apr 2002 08:38:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passing-variable-to-connect-direct/m-p/2698701#M57382</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-04-14T08:38:37Z</dc:date>
    </item>
  </channel>
</rss>

