<?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: DB2 SQL from Shell Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076256#M735568</link>
    <description>Is this for me ?</description>
    <pubDate>Wed, 26 Sep 2007 06:05:53 GMT</pubDate>
    <dc:creator>Prabhu_9</dc:creator>
    <dc:date>2007-09-26T06:05:53Z</dc:date>
    <item>
      <title>DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076254#M735566</link>
      <description>hi, &lt;BR /&gt;I want to run a DB2 script from the shell. &lt;BR /&gt;How can i do it? &lt;BR /&gt;I even want to accept an argument value from the user which i'l be substituting in the script &amp;amp; then execute the DB2 script by a shell script. &lt;BR /&gt;&lt;BR /&gt;Please help me out... &lt;BR /&gt;tx in advance. &lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2007 03:34:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076254#M735566</guid>
      <dc:creator>Prabhu_9</dc:creator>
      <dc:date>2007-09-26T03:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076255#M735567</link>
      <description>&lt;!--!*#--&gt;Shalom,&lt;BR /&gt;&lt;BR /&gt;General scripting rules will work here. Simplistic example.&lt;BR /&gt;&lt;BR /&gt;arg1=$2&lt;BR /&gt;# second argument is in a variable, which can be used any way you like below&lt;BR /&gt;&lt;BR /&gt;sqlplus -s ${DB_CONNECT} &amp;lt;&lt;END_SQL&gt;&lt;/END_SQL&gt; INSERT INTO T_PROCESS_STATS ( START_DT,    PROCESS_NAME_TXT, END_DT,  RECORDS_PROCESSED_VAL, MSG_TXT)&lt;BR /&gt;VALUES (&lt;BR /&gt; SYSDATE, 'backup_ref_data_dly.ksh', SYSDATE, 0, 'Backup of reference data - daily');&lt;BR /&gt;SHOW SQLCODE&lt;BR /&gt;end_sql&lt;BR /&gt;&lt;BR /&gt;Note the general principle is to put what would normally be hand typed statements into the script line by line. Each line simulates an enter between &amp;lt;&lt;END_SQL and="" end_sql=""&gt;&lt;/END_SQL&gt;&lt;BR /&gt;Change the sqlplus to the proper DB2 equivalent and you can script darned near anything you want.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2007 03:52:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076255#M735567</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-09-26T03:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076256#M735568</link>
      <description>Is this for me ?</description>
      <pubDate>Wed, 26 Sep 2007 06:05:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076256#M735568</guid>
      <dc:creator>Prabhu_9</dc:creator>
      <dc:date>2007-09-26T06:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076257#M735569</link>
      <description>"Is this for me ?"&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;He's showing you a shell script containing a "here-doc".  That is the part from&lt;BR /&gt;bounded by "&amp;lt;&lt;END_SQL&gt;&lt;/END_SQL&gt;&lt;BR /&gt;anything between those strings are sent, in this case, to the "sqlpus" command as if they were typed at the keyboard.  &lt;BR /&gt;&lt;BR /&gt;Note that their are rules about here-docs.  from the sh-posix man page:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;&amp;lt;[-]word      The shell input is read up to a line that matches word, or to an end-of-file.  No parameter substitution, command substitution or file name generation is performed on word.  The resulting document, called a here-document, becomes the standard input.  If any character of word is quoted, no interpretation is placed upon the characters of the document.  Otherwise, parameter and command substitution occurs, \newline is ignored, and \ must be used to quote the characters \, $, `, and the first character of word.  If - is appended to &amp;lt;&amp;lt;, all leading tabs are stripped from word and from the document.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2007 10:46:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076257#M735569</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-09-26T10:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076258#M735570</link>
      <description>*** Replace to DB2 equivalent*****&lt;BR /&gt;i have samples for calling Oracle or SQL Server SQLs from unix shell script... but&lt;BR /&gt;iam not finding script to call DB2 from shell script. thats what i wanted.</description>
      <pubDate>Wed, 26 Sep 2007 22:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076258#M735570</guid>
      <dc:creator>Prabhu_9</dc:creator>
      <dc:date>2007-09-26T22:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076259#M735571</link>
      <description>hmm...db2 command line processor is called "db2"...is that what you're looking for?&lt;BR /&gt;&lt;BR /&gt;also see here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/db2.html" target="_blank"&gt;http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/db2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Sep 2007 10:56:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076259#M735571</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-09-27T10:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076260#M735572</link>
      <description>Nope.&lt;BR /&gt;&lt;BR /&gt;Iam looking for samplee shell script which 1) connects to DB2&lt;BR /&gt;2) Fetches count from a table.&lt;BR /&gt;&lt;BR /&gt;I just need exact syntax of how to connect to DB2 from shell script and fetch the count.</description>
      <pubDate>Thu, 27 Sep 2007 23:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076260#M735572</guid>
      <dc:creator>Prabhu_9</dc:creator>
      <dc:date>2007-09-27T23:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 SQL from Shell Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076261#M735573</link>
      <description>well, how would you do it from the command line?  If you can't answer that, it's time to hit the manuals</description>
      <pubDate>Fri, 28 Sep 2007 08:56:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/db2-sql-from-shell-script/m-p/4076261#M735573</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-09-28T08:56:36Z</dc:date>
    </item>
  </channel>
</rss>

