<?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 Setting TERM variable in Script to run from CRON in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441736#M7731</link>
    <description>We have the need to setup some environment variables in a script that ultimately executes a cobol program and is scheduled by CRON.  When it gets to where it runs the cobol progran, I get the error "Terminal type not defined".  We copied the following from the root .profile and put it at the top of the script, but now we're getting the error "not a terminal":&lt;BR /&gt;if [ "$TERM" = "" ]&lt;BR /&gt;then&lt;BR /&gt;eval ` tset -s -Q -m ':?hp' `&lt;BR /&gt;else&lt;BR /&gt;eval ` tset -s -Q `&lt;BR /&gt;fi&lt;BR /&gt;stty erase "^H" kill "^U" intr "^C" eof "^D"&lt;BR /&gt;stty hupcl ixon ixoff&lt;BR /&gt;tabs&lt;BR /&gt;export TERM&lt;BR /&gt;&lt;BR /&gt;How can we do this?  Cobol apparently needs TERM set, but we need to run this from CRON.&lt;BR /&gt;&lt;BR /&gt;Help!?!?!</description>
    <pubDate>Thu, 31 Aug 2000 14:31:40 GMT</pubDate>
    <dc:creator>Garrin Thompson</dc:creator>
    <dc:date>2000-08-31T14:31:40Z</dc:date>
    <item>
      <title>Setting TERM variable in Script to run from CRON</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441736#M7731</link>
      <description>We have the need to setup some environment variables in a script that ultimately executes a cobol program and is scheduled by CRON.  When it gets to where it runs the cobol progran, I get the error "Terminal type not defined".  We copied the following from the root .profile and put it at the top of the script, but now we're getting the error "not a terminal":&lt;BR /&gt;if [ "$TERM" = "" ]&lt;BR /&gt;then&lt;BR /&gt;eval ` tset -s -Q -m ':?hp' `&lt;BR /&gt;else&lt;BR /&gt;eval ` tset -s -Q `&lt;BR /&gt;fi&lt;BR /&gt;stty erase "^H" kill "^U" intr "^C" eof "^D"&lt;BR /&gt;stty hupcl ixon ixoff&lt;BR /&gt;tabs&lt;BR /&gt;export TERM&lt;BR /&gt;&lt;BR /&gt;How can we do this?  Cobol apparently needs TERM set, but we need to run this from CRON.&lt;BR /&gt;&lt;BR /&gt;Help!?!?!</description>
      <pubDate>Thu, 31 Aug 2000 14:31:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441736#M7731</guid>
      <dc:creator>Garrin Thompson</dc:creator>
      <dc:date>2000-08-31T14:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Setting TERM variable in Script to run from CRON</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441737#M7732</link>
      <description>The 'not a terminal' message is from 'stty'.&lt;BR /&gt;&lt;BR /&gt;You don't want to run 'stty' or 'tset' from cron because they require a real terminal to be connected.&lt;BR /&gt;&lt;BR /&gt;If your application requires TERM then simply export the require value e.g.&lt;BR /&gt;&lt;BR /&gt;export TERM=vt220&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2000 14:35:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441737#M7732</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-08-31T14:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Setting TERM variable in Script to run from CRON</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441738#M7733</link>
      <description>Surely it can't that easy?!?   :-)&lt;BR /&gt;&lt;BR /&gt;I'm glad I have this forum...Thank you all!</description>
      <pubDate>Thu, 31 Aug 2000 14:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setting-term-variable-in-script-to-run-from-cron/m-p/2441738#M7733</guid>
      <dc:creator>Garrin Thompson</dc:creator>
      <dc:date>2000-08-31T14:36:31Z</dc:date>
    </item>
  </channel>
</rss>

